I’ve got a problem with the Action timer and their connection to Local obstacles (or Passageways).
With a first Action timer I want to reset the run clock, trigger all agents in the system and update local obstacles, like there was an incident. This works like a charm.
After that I want a second (or even more) Action timer to update more local obstacles. This is currently not working at all. Since my first AT will have an event time like 1-3 hours and the second ones 6-12 minutes, the second one is usually faster or doesn’t work at all.
I can imagine two possibilities how this could work but I cannot implement it.
First: The first AT should trigger the second AT within the “Event Trigger” menu. So the settings for the second AT first starts counting when the first AT updated the system. This is similar to how the local obstacles get updated.
Second: If possible, I would make an If-Statement within the "Event time" of the second AT. The query would look after the incident time (the red clock). So if 0,1 or 6 minutes elapsed than the second AT should start counting. The problem is, I can only think that "RunClock_GetEvacuationTime(c)" is suitable for this one but it won't work.
If there is a more elegant method, I appreciate it to. See the provided model as an example for the basic idea.
A question besides:
The agents aren’t allowed to walk past the local obstacles. If you look in the provided model this is working. But instead searching for another way out, they just keep running against the local obstacle. Passageways seem like to do a better job, so I guess i should place those, if I want to block a route?
- (189.36 KiB) Downloaded 171 times
What I do understand from your description is the following:
- The first action timer is triggered at a random time between 1-3 hours.
- The time for the second action timer follows a few minutes after the first one.
So, the difficulty is in the randomness of the first timer, which makes that you cannot set a fixed timer to the 2nd like: 3 hours + 10 minutes.
See attached file for my suggestion how you can model this situation:
- Please go to the menu Modeling > UserTables, select ModelSettings and click View Data: The idea is that this table contains the time for the first timer.
- Close this table view, select the table ModelSettings again and click edit. You'll now find a parameter window for the modelsettings, open the setting ResetCode.
- In this code I did the following: when the model reset is executed, the script will update the value in row 1, column 1 of the table. It will update the cell value to a random time between 5 and 10 minutes (in your case that would be something like Uniform( hr(1), hr(3))).
Now go into the model and have a look at the parameters of the action timers:
- Check the field event time of the action timer 1: it reads the value from the ModelSettings table. This action timer closes the passageway and let the agent's reroute.
- Now check the Event Time of action timer 2: it also reads the value from the modelsettings table, but adds an additional 5 minutes. This makes sure that action timer 2 is always triggered exactly 5 minutes after action timer 1. This action time will enable the local obstacle in the model.
(note: both action timers stop the simulation, so you can quickly simulate until the first timer then press run to go to the next timer).
Regarding your questions about the local obstacle and passageway I have the following remarks:
- Local obstacles do NOT block a complete path / network line. They are just an area that agents walk around when they get it in view, but they do not replan a route because of those obstacles. So, you can only use them when you want to make a blocked space in a wider area, but there should always be space left to walk around them.
- If you want to really block a complete part of the path and want the agents to replan to other routes, then a passageway is indeed a better solution. Please make sure that passageways are rotated correctly: the green line in the passageway must be in line with the network path that you want to influence. This is ok: , This would have no effect at all: Kind Regards, Marlies
- 2016121 Action Timers -opt2.mod
- (165.2 KiB) Downloaded 202 times
thanks for your fast reply. You understanded correctly, first I want one Action Timer with a random time and second one close after that.
Your suggested answer is also the solution I needed. I did not even touch the user tables at all but this will do.
Regarding Passageways, I wondered why my passageway did not have any influence at all and in my main model it worked. It's good to know I have to rotate them, it didn't even cross my mind.