0

I have this model,where the selectoutputout is decided by function and I'm using an material type agent named S. why does anylogic give me this error (red underlined)? Thanks. error

1 Answers1

0

You haven't defined any arguments to chooseOutput(), you need to add a line in the Arguments section on the right if you actually want to use it. However, looking at the code of the function it doesn't appear to be using any external arguments. So i suspect what you need to do is change chooseOutput(agent) to be just chooseOutput() in the selectOutput object.

Additional (optional) suggestions:

  1. It isn't a good practice to have agent type names with only one letter as it might collide with an internal AnyLogic type
  2. Variable names should also be meaningful and not just single letters
  3. It is a good practice to format code as it improves readability which is helpful when asking for help
Artem P.
  • 816
  • 1
  • 6
  • 8