Jump to content
Sign in to follow this  
15700771

Transferring vehicles from a Basicnode parkingstation

Recommended Posts

Good day,


I have vehicles carrying entities in a batch process that arrive at servers at various time intervals. The vehicles are transferred to a basicnode parkingstation to wait until vehicles with the same properties arrive. These vehicles then have to be transferred to the server after the delay has occurred.


I am currently using BasicNode.ParkingStation.Contents.ItemAtIndex(object).Vehicle.Priority to loop through the values in the queue, but I cannot transfer the specific vehicles to the input at the server once the conditions are met since the expression for the entity object in the Transfer step would not allow me to do so.


Hope you have a solution,


Thank you in advance

Rhynard Prins

Share this post


Link to post
Share on other sites

Do you use Search step to loop through the queue?


Each Search step has two endings original and found. The found token is associated with the found object (entity, vehicle whatever)

You just use Transfer step on this ending.


Search step also has many way to prioritize or match exact condition to find what you want.

Share this post


Link to post
Share on other sites

Thank you very much for the reply.


My problem is that the executing token is a ModelEntity and I want that ModelEntity to search through a Basicnode Parkingstation as soon as it enters the server to find the vehicle with the same priority as the executing token. The matching vehicle then needs to be transferred to the input node of the server. If I use the search step I keep getting an error that there is an object miss-match between the entity and the vehicle.


Is there a way to search through a Basicnode parking station with an executing token and return the vehicle to be transferred once it is found?


I am currently looping through the queue with BasicNode.ParkingStation.Contents.ItemAtIndex(object).Vehicle.Priority using a decide within another decide step and the object as the counter. It works to find the combination but cannot return the correct vehicle properties for the transfer step.


Hope you can help,


Rhynard Prins.

Share this post


Link to post
Share on other sites

You can use the search step to return the index of the vehicle you're looking for fairly easily.


For the search step return value, try something along the lines of Candidate.CurrentStation.Contents.IndexOfItem(Candidate) which should cause your tokens return value (Token.ReturnValue) to be set to the index of the object you want.


Alternatively, make use of the Search steps 'return index of item found' property.

Share this post


Link to post
Share on other sites

Model Entity bound token can still search through queue.


You just need to specify match condition like: ModelEntity.Priority == Candidate.vehicle.priority

ModelEntity is bound to the original token and you use the keyword Candidate to specify, that you mean items that are in the queue.


Vehicles (and there can be more then one) which match the condition will be associated with the Found Token.

So on the Found branch you can use Transfer step.

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×