04-27-2018 09:13 AM
Hi,
I want to use a waituntil statement but be able to ignore it and continue regardless if it is fulfilled or not when it have waited for a certain time.
So I had an idea to use something like this
waituntil (Buffer.numMu > 0 and Station.occupied = false) or timer = 0
But I can't figure out a way to create a functional timer.
Another thought I had was something like this:
var timer := 10:00 var stopTime := eventcontroller.simtime + timer waituntil (Buffer.numMu > 0 and Station.occupied = false) or eventcontroller.simtime > stoptime
But you can't watch the eventcontroller, so this doesn't work.
Any other ideas?
04-27-2018 09:38 AM
the second variant should work, you can observe simTime (see example --> exit control station)
Steffen Bangsow freelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net | ![]() |
04-27-2018 09:52 AM
That's interesting. I get this error when I try it:
Any idea why?
04-27-2018 10:04 AM
Steffen Bangsow freelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net | ![]() |
04-27-2018 10:13 AM
The value of the command "eventcontroller" was linked to the correct eventcontroller in my model. When I changed it to "root.eventcontroller" I still got the same value, but I did not get the error in my image above.
So this "root." solved the issue somehow. Thanks for the help!
05-02-2018 03:38 AM
Hello,
juste in case you don't see that
waituntil condition [prio number] [wait timespan:time] stopuntil condition [prio number] [wait timespan:time]
waituntil have a new param named "wait" to waituntil a condition or a time.
Regards,
rpinon
05-03-2018 02:04 AM
I had completely missed that, thanks for the input!