Jump to content

Worker in 2 servers problem


Recommended Posts

Hi everyone.


In my project I have a worker that has to do something to entities on 2 servers (as a secondary resource of a server the worker moves to the server) and then transport them to the respective locations. The problem is that sometimes the worker only does something to the entities and does not transport them, which cannot hapen.


Any ideas? I uploaded a sample of the problem I described.

exp_cantina.spfx

Link to comment
Share on other sites

One way is to change a variable when a Worker is seized, and check that variable in the Worker_EvaluatingSeizeRequest process. If the variable is 1, accept the request, but if it is 0, reject the request because the Worker still needs to transport the other entity. In the attached model, the variable Worker.priority is changed to 0 when the worker is seized and back to 1 when the entity is unloaded in process Worker_Unloaded. Worker_EvaluatingSeizeRequest checks the value of Worker.Priority to accept/reject seize request.


In sprint 7.123, you can reserve the Worker so it can't be seized by other entities. Since the model is very simple, this method works well. There are other ways to model this, if this method does not work.


Katie

exp_cantina1.spfx

Link to comment
Share on other sites

×
×
  • Create New...