I would suggest looking into Anylogic Agents and how they work.
take a look here: anylogic agent doc
when you have created and agent for your cars, trucks etc., you'll need a statechart to manage the different states of your model: Anylogic statechart doc
In the statechart you can create a function that monitor the time or whatever parameter you want. when the condition is true you proceed to the relevant state eg. rush hour, noon or whatever you need.
when you are in that state you can add your code to change to the speed you want
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more