I’m trying to make a Seize block to choose from different resource pools depending on the agent type that is passing through the block.
My first try was to create a dynamic reference of the Resource set parameter in a Seize block as the image shows:
image of dynamic value in Resource set
if(agent instanceof Pala || agent instanceof Torre){
Extensibles;
}else{
Camabajas3e;
}
where Extensibles and Camabajas3e are the resource pool names.
But I get the error: “Type mismatch: cannot convert from ResourcePool to ResourcePool[][].”
My second attempt was to include both resource pools in the list and instead use the parameter “Resource choice condition” with the following code:
agent.vehículo==unit.vehículo
were vehículo es a parameter inside each agent type in the flowchart and each resource type from the resource pool.
But I get the error: “vehículo connot be resolved or is not a field” but it is a parameter inside agents and resources.
What I’m doing wrong? How can I solve it?
Thank you.