1

This statechart won't leave the Running state based on the condition of a boolean variable (lowCases). What am I doing wrong? Here's the code for the transition:

transition code

While in the Running state, the variable (lowCases) switches to TRUE but the state won't change:

enter image description here

What am I missing?

  • 2
    your answer here: https://stackoverflow.com/questions/47888704/anylogic-why-does-my-condition-based-transition-not-work – Felipe Aug 28 '19 at 17:29
  • 1
    Thank you Felipe. I've placed onChange() after my lowCases=true statement elseware in the model and now the transition works. For my education, is there a way to set lowCases to true that will automatically be captured by the API Engine? – Kevin Swartz Aug 28 '19 at 17:47
  • 2
    btw, best avoid conditional transitions entirely. Not only is it easy to miss them not firing (as in your case) but also they can eat up considerable computing power in larger models for nothing (since they are checked at every event). Also, you can *always* replace it with event- or msg-based transitions elegantly :-) – Benjamin Aug 29 '19 at 05:16
  • Good to know @Benjamin. Thank you. – Kevin Swartz Aug 29 '19 at 10:22
  • 1
    Possible duplicate of [AnyLogic - Why does my condition based transition not work?](https://stackoverflow.com/questions/47888704/anylogic-why-does-my-condition-based-transition-not-work) – Benjamin Aug 29 '19 at 11:25

0 Answers0