Reputation: 313
In Seize "resource choice condition" I add 3 technician but only one of them work and remaining 2 do nothing.
Now according to the above image only technician with value "batter" which is first one will only work remaining two will remains ideal/will not work.
Note: if I put technician with value "battery" on the top then it will only work remaining 2 will not work.
My ultimate goal is make all the technicians work so I can put condition on them.
For example if My agent customer have parameter called "battery" is true then technician with value "battery" will work on it and on remaining customers remaining 2 technicians work.
Something like that:
if (agent.batteryProb == true){
((technician)unit).problemsSolved.equals("battery");}
else{
((technician)unit).problemsSolved.equals("batter");
((technician)unit).problemsSolved.equals("batte");}
I am also adding the screenshot of my running model below. In which you can also see the ResourcePool details.
Upvotes: 0
Views: 44
Reputation: 2213
That's how you would write your conditions:
agent.batteryProb == true ?
((technician)unit).problemsSolved.equals("battery") :
agent.batterProb == true ?
((technician)unit).problemsSolved.equals("batter") :
((technician)unit).problemsSolved.equals("batte")
Upvotes: 0
Reputation: 358
Under Resource choice condition of the seize block you can write only one condition that returns true or false. This explains why it is always the first row that is executed and the others are not.
Upvotes: 1