Jump to content

Recommended Posts

Posted

Hello.

 

I would need to create a simulation where the first and the last entities created goes to a different server than other. To do that I have created a node with to exiting path where the rule is a decide and the rule is entity.id == 1 || 150.

 

But when I start the simulation the first entity created has the id = 18.

 

How can I put that the first entity created as the .1 ??

 

Thank you

Posted

You cannot control the entity id number yourself, that's internally controlled. However, you can use a model state variable / model entity state variable to do something similar with your own count, based on the entities generated. When an entity is created, simply assign the model state variable  == model state variable + 1. Then assign ModelEntity state variable to the model state variable.  

  • 2 weeks later...
Posted

Maybe my application is easier.

 

I would like to create a batch of 150 entities, but only the first and the last should go to a different server than other 148.

 

To do that, I have created a transfer node and I created a procces with to decide node, asking if the entity is the first or the last.

 

But it does not work.

 

image.png.e5cd6202134d343ba3302759fb74247a.png

 

image.thumb.png.2f7db1b877a5d4f6b7ad12c13c54dd9f.png

×
×
  • Create New...