Process Simulations
The process simulations extension models industrial equipment behaviors, machine profiles, and utilities dynamics. Use these nodes to feed synthetic workflows into data grids, charts, and databases before connecting live physical machinery. This class requires an instance. The code class identifier maps to individual simulator models.
Energy consumption simulation
The EnergySimulator class models continuous household or factory utilities usage (power, gas, and hot water) using cyclical sine wave rhythms combined with dynamic noise variations.
create
Initializes an energy simulator model targeting explicit annual baselines.
Parameters
config
power
Target annual power consumption in kilowatt-hours (kWh).
integer
gas
Target annual gas volume consumption in cubic meters (m³).
integer
water
Target annual hot water volume consumption in cubic meters (m³).
integer
Output
Returns the simulation instance. The background loop starts automatically.
Examples
# config
power: 4500
gas: 1200
water: 90start
Resumes the background calculations updater loop.
Parameters
None.
Output
Returns true when execution resumes.
stop
Freezes current values and pauses the updater background loop.
Parameters
None.
Output
Returns true when execution pauses.
getLiveValue
Returns the instantaneous usage rate for a chosen media utility.
Parameters
mediaType
The targeted utility name. Must be power, gas, or water.
string
Output
Returns a number representing the immediate consumption rate:
Power: Kilowatts (kW)
Gas: Cubic meters per hour (m³/h)
Water: Cubic meters per hour (m³/h)
Examples
getAggregatedValue
Returns the total accumulated consumption volume logged since instance launch.
Parameters
mediaType
The targeted utility name. Must be power, gas, or water.
string
Output
Returns a number tracking cumulative metrics:
Power: Kilowatt-hours (kWh)
Gas: Cubic meters (m³)
Water: Cubic meters (m³)
Machine simulation
The MachineSimulator class reproduces a standard CNC milling station, fluctuating real-time operational telemetry (including speed, load, and internal temperatures) while processing order backlogs.
create
Constructs a simulated CNC equipment identity profile.
Parameters
config
id
Unique serial or station string ID.
string
name
Human-readable display name string.
string
model
Equipment model designation. Default Generic-CNC.
string
Output
Returns the machine simulation instance.
Examples
connect
Spins up internal runtime loops, transitioning device telemetry states from offline baselines into live operational parameters.
Parameters
None.
Output
Returns true.
disconnect
Shuts down active cycles, resetting spindle metrics to zero and cooling temperatures back to room ambient baselines.
Parameters
None.
Output
Returns true.
getData
Returns a unified state record combining active job specifics with raw sensor diagnostics.
Parameters
None.
Output
Returns a flat payload object tracking running characteristics.
Example payload:
Silo fill level simulation
The SiloSimulator class outputs an ongoing depletion lifecycle. Material content gradually drains until crossing a low 10% safety threshold, automatically engaging a rapid recharge process.
create
Defines physical volume boundaries and consumption speeds.
Parameters
options
capacity
The maximum structural mass or volume capacity. Default 100.
integer
timeToEmpty
Duration in seconds required to deplete content from full capacity down to the 10% target threshold. Default 60.
integer
Output
Returns the silo simulation instance.
Examples
start
Engages depletion cycles and kicks off regular telemetry broadcasts.
stop
Halts processing routines.
getLevel
Returns the immediate quantitative volume level state manually.
Output
Returns the level metric as an integer or float.
onLevelUpdate
Fires update events repeatedly every second during active operations.
Parameters
callback
The callback function. Payload: current volume level.
callback
Output
Returns nothing.
Last updated
Was this helpful?