I am an AnyLogic newbie. When I define an agent type and add parameters to it, I can call a constructor
MyAgentType agent1 = new MyAgentType(param1, param2, ..., paramn)
The parameters are set on the new instance and can be used in workflow and other functions - fine.
Now I want to define some variables on the same agent type, but as it is a variable, it is not included in the constructor and needs to be explicitly set after instantiation. However, if I now try to inject this new instance into a flow diagram using enter.take(agent1) the agent in the flow diagram seems to "loose" the variable value (breakpoint show it to be null).
What am I missing?