NickA
NickA

Reputation: 443

Setting condition in selectOutput block

I have an selectOutput block in which I would like agents of type Patient to continue through OutT if they have passed through a particular timeMeasureStart block. After passing agent.timeMeasureStart in the condition, I receive 'timeMeasureStart' cannot be resolved or is not a field.

Upvotes: 0

Views: 280

Answers (1)

Emile Zankoul
Emile Zankoul

Reputation: 2213

Create a variable for your agent type Patient. Let's say you name it tmsTrue. Make the variable of type boolean. In the On Enter field of the timeMeasureStart block write:

agent.tmsTrue = true;

enter image description here

Then set your select output condition as:

agent.tmsTrue == true

enter image description here

Of course make sure that the variable's initial value is set to false.

enter image description here

Upvotes: 1

Related Questions