The package DutyCycleNumbers provides a special type of "numbers" for the programming language julia that represent piece-wise constant waveforms, e.g. values that are discontinuous in time. This can be rather convenient for modeling electrical equipment if it is turned on and off with a given dutycycle. More complex switching patterns are also possible.
Documentation is avaliable online. Note that julia version 1.1 (or newer) is required.