CentraleSupélecDépartement informatique
Plateau de Moulon
3 rue Joliot-Curie
F-91192 Gif-sur-Yvette cedex
A light switch and a fluorescent bulb

This example shows how TESL can deal with very different time scales without needing a very large number of computed instants.

A fluorescent light bulb takes 1s to become completely lit after being switched on, and 50ms to become completely off after being switched off. When a button is pressed, the light is switched on for one minute.

The result of this simulation is difficult to show on a picture because of the large difference in magnitude between the one minute delay before switching the light off and the 50ms delay for the light to become dark. In order to separate the ticks of the switch_off and light_off clocks, you must have a very large space between the ticks on switch_on and switch_off. We therefore give the result as shown by the @dumpres directive. As you can see, thanks to the computations on tags, this simulation has only 4 instants (we do not need a clock which ticks every 50ms):

## Simulation result:
# Tag = 500.0
  button
  switch_on
# Tag = 1500.0
  light_on
# Tag = 60500.0
  switch_off
# Tag = 60550.0
  light_off
## End