问题
I recently hit a severe performance wall in an AnyLogic model and decided to do some method profiling. The top-level culprit was com.anylogic.engine.Engine.mc()
, but what does it do, and how do we speed it up?
回答1:
Ideally, never use conditional transitions, only message-based, timeout-based and agent-arrival-based ones. Otherwise, your condition-based transition keeps checking all the time if it's condition has been met yet.
回答2:
It was explained to me that com.anylogic.engine.Engine.mc()
is where conditions in events and transitions are checked. If Engine.mc()
is slowing you down, check your condition events and condition transitions!
来源:https://stackoverflow.com/questions/45069863/what-is-engine-mc-and-why-is-it-slowing-down-my-model