'Is there any way to output "monitor" objects value in real time as text/values in Salabim?
I know we can use animatemonitor to have a synchronized real-time value of monitor objects value and display as a graph over the built-in display/gui, but I have a requirement to use those values/plot in another graph in a browser. So i need those raw data in a synchronized real time manner. Is it possible?
Solution 1:[1]
What you could do is start the animation (possibly with a minimized window and no further functionality) and create your own Environment.animation_pre_tick() method that emits the values you want to show in another way.
Something like:
import salabim as sim
class RealTimeEnvironment(sim.Environment):
def animation_pre_tick(self, t):
... # put your emitting code here at time=t
env = RealTimeEnvironment()
env.animate(True)
env.run(sim.inf)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ruudvanderham |
