dfj328
dfj328

Reputation: 367

Adding a programatically created agent into a process model?

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?enter image description here

Upvotes: 0

Views: 181

Answers (1)

instead of PedSource, use the "Enter" object. and the in the code use:

enter.take(off)
enter.take(off2)

Upvotes: 2

Related Questions