eddieskim Posted November 8, 2021 Share Posted November 8, 2021 I am trying to make a routing decision based on the Candidate node's routerequestqueue's summation of the entities user-defined property. If there are different types of entities with ex. different priority levels. I would like the routing process to choose the transfernode which has the smallest total sum of it's entities priority level. the transfernode that needs to be chosen also has a routing group attached to its entity destination type rule where its final machine has 0 buffer and due to a blocked destination rule, there will be a queue build up at the transfernode that needs to be chosen. I have thought about using a state variable for each node and using add-on process each time a unit enters and leaves a node but because the main model has many multiple nodes the node's entity priority sum has to be able to be accessed through the candidate.transfernode._________________. For example during the routing step in the process section, I have candidate.transfernode.destinationroutinggroupname.routerequestqueue which gives me the node's number of units waiting, but i need to be able to access the candidate nodes summed queued property. Is there either a way to directly access this information, have looked at the expressions and having a hard time finding something. failed attempt: candidate.transfernode.destinationroutinggroupname.routerequestqueue.population.defaultentity.priority.summation or is there a way to use the add-on process where i am adding/subtracting the priority levels, but somehow attach it to the candidate.transfernode's property Hopefully this makes sense. If you look at the file, please ignore the upper half and focus on the transfer nodes maintransfer, transfernode1 and transfernode1_1. maintransfer has an entered add-onprocess which is the subject of this question. the route process and it's selection expression is what I'm trying to adjust but find a way to express the candidate transfernodes of transfernode1 and transfernode1_1 (which are part of the XferRouting group). I'd like to choose and compare the total summed priority level of each node's queue. Simple_Routing.spfx Link to comment Share on other sites More sharing options...
jzhou Posted November 10, 2021 Share Posted November 10, 2021 what if we add a state variable to the transfernode and add the ModelEntity.x to the state variable? Simple_Routing.spfx Link to comment Share on other sites More sharing options...
eddieskim Posted November 17, 2021 Author Share Posted November 17, 2021 Figured this out using state variables and data tables used as the destination based on state of same row. Link to comment Share on other sites More sharing options...
Recommended Posts