Reputation: 367
On startup I programatically create two agents at particular points. Using the following code -
Officer off = this.add_officers();
off.setXY(this.start1.getX(), this.start1.getY());
Officer off2 = this.add_officers();
off2.setXY(this.start2.getX(), this.start2.getY());
I would like to add these two agents into my process model logic, however the following code does not produce the required behaviour -
pedSource.addAgentToContents(off);
pedSource.addAgentToContents(off2);
How can I add the programatically created agents into my process model?
Upvotes: 0
Views: 181
Reputation: 717
instead of PedSource, use the "Enter" object. and the in the code use:
enter.take(off)
enter.take(off2)
Upvotes: 2