Jump to content

Request a transport before entiy arrives to a node


Recommended Posts

Hi,


I would like to call for the ride, before an entity arrives at the node where it will be loaded.


For example, if the entity is at node 1, I would like it to request the transport at that node. When the request is sent, The transport will start moving its way to node 2. Once the transport arrives at node 2, entity will start moving its way to node 2 and load to the transport.


Thanks in advance

Link to comment
Share on other sites

Sorry, I wasn't clear enough before.


I added the move step to node1 already, but I think I need to make some changes with the transport as well, because when I run the model, I get an error message that says "Cannot move '1' objects because the number of resources owned and satisfying the request condition is only '0'."


The transport's routing type is 'On Demand' and its its idle action is 'Go to Home'. When the entity arrives at node 1 and runs the 'move' process, the transport is located at its predefined home.

Link to comment
Share on other sites

Excerpt from help:

 

Move


The Move step may be used to request a move from one or more moveable resources that have been seized by either the parent object or object associated with the executing token. The executing token will be held in the Move step until the resources have arrived to the requested locations.


This step may be used in conjunction with the Seize step and the Release step.

Link to comment
Share on other sites

It worked but, another problem followed up.


This time, the transport moves to node that it is supposed to pick up the entities, but it doesn't pick them up and just waits there. I figured, I need to release the transport first, so that the entities can get on.


But this time, the transport moves on before it picks up the entities. (Entities are not at the meeting node yet since they first wait for the transport to get there.)


What should I do?

Link to comment
Share on other sites

Here.


When you run the model, you can see that the entity calls for the ride at output@server1 to transfer node 3. Once the transport arrives at transfer node 3, the entity starts moving to transfer node 3. But when they meet there,the vehicle doesn't pick up the entity and move along, and that is my problem. I want the vehicle to pick up the entity, and move to sink.


Thanks

Model1.spfx

Link to comment
Share on other sites

You had several different problems here.


First of all, your sequence was incorrect - it included the output of server 1 and your entity never moves there by a sequence (it just emerges there after visiting server 1)


Second you need to seize a vehicle, move it, then release it. No requests are processed while a resource is seized.


Third, the entity was waiting for the move to complete before it started moving. I assume that the point of this was to have them concurrently move toward each other. To make that happen 2 things must be overcome.

1) All add-on processes wait for completion before the executing entity proceeds with other actions,

2) The Move Step by definition holds the token until the Move is complete.

Both of these are overcome by creating a second process which is Executed with the Token Wait Action set to none (no wait)ProcessNoWaitOption.PNG.3f6c857947862671dbf0870bbcb95b69.PNG

Finally, the return to home option on the vehicle conflicts with your intent for the vehicle to move somewhere and wait for the entity. it can't both wait while idle and return to home when idle.

Link to comment
Share on other sites

Unfortunately, two things that you considered problems are the things that are crucial to the model.


First, the vehicle needs to move to transfer node 1 once it drops off entities at transfer node 2. That is a must. It needs to wait there until entities leave the server.


Second, your assumption to have the entity and the vehicle to move concurrently is wrong. The problem would have been way easier if that was the case. The entity needs to start moving to transfer node 3 only when the transport arrives there. Think of it as a vehicle with a crane, pulling up a man from a deep well, where there is no ladder. Hence, the entity can only move up (in this case move to transfer node 3), after the vehicle gets there.

Link to comment
Share on other sites

The second problem is easy. Simply change the Execute step option highlighted above to its default "WaitUntilProcessCompleted".


For the first problem, what I said is still accurate. You can easily enable homing when idle, or you can tell it to wait somewhere when idle, but you can't automatically do both.

To allow

the vehicle needs to move to transfer node 1 once it drops off entities at transfer node 2
you will need to provide a path so the vehicle can actually get back to transfer node 1. And you will have to add some similar logic to send the vehicle there when it is appropriate for it to go there.


All of this discussion is to allow you to model exactly the behavior you have described. But as you share more details of your objective, it looks more and more like this could be easily approximated just using automatic library behavior without all this complexity. For example, the time to "pull up the man from the deep well" might just be modeled as a loading time.


Every model is an approximation and a big part of effective modeling is know the correct level at which to approximate. If you would like some advice on how I would model this, please post or email me the full details of the situation you want to model and your objectives (e.g. why are you modeling it and what do you want to learn).

Link to comment
Share on other sites

For example, the time to "pull up the man from the deep well" might just be modeled as a loading time.

 

That is not possible since I need to see the entity moving on a path. I am trying to point out must-have characteristics of my system so that they can be a part of the solution. I know it would be much easier if I just describe you the end result I am trying to achieve, but I can't do that since the cases I work on are military cases and it is stricly prohibited to share them. I am trying to give you as much information as possible without actually giving away the military tactics.


Thanks for your assistance

Link to comment
Share on other sites

  • 3 weeks later...

Hi,


If I understand correctly, the vehicle must first be released before it will pick up the entity to transport it. See attached model.


Alternatively you can set the vehicle's home node to the node you want it wait at. Just set the vehicle default to go to home node and set the home node to the pickup node.


Regards,

Imre

Model1_fix.spfx

Link to comment
Share on other sites

×
×
  • Create New...