Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

teresimio123

container entity location

Recommended Posts

Hi!! I want to know in which object (in this case filler) my container entity is when certain event occurs. Is there a way to access this info?

Thank you so much!

Teresita

Share this post


Link to post
Share on other sites

ModelEntity.CurrentStation might help you.

Alternatively: You could register the object in an ObjectReference state or its name in a string state, depending on what you want to do with this information.

Edited by GFurtado

Share this post


Link to post
Share on other sites

Gustavo, how can I register ContainerEntity.CurrentStation as a string? As to write it in excel with excel write step afterwards.

Thanks again!

Share this post


Link to post
Share on other sites

ModelEntity.CurrentStation.Name

Be aware that this will return an error in the case the entity is not at a station.

Share this post


Link to post
Share on other sites
29 minutes ago, GFurtado said:

ModelEntity.CurrentStation.Name

Be aware that this will return an error in the case the entity is not at a station.

Wait, actually this doesn't work.

Check the attached model:

  1. Create a new ContainerEntity with a string state named whatever you like;
  2. Assign NewContainerEntity.NewStringState = Filler.Name when entering the filler.
  3. Use this expression any time you need the name of the last station that entity visited.

Get Station Name.spfx

Share this post


Link to post
Share on other sites

Thanks Gustavo, actually what worked for me was ContainerEntity.Location.Parent.Name! Anyway thank you very much. 

I have another doubt which I think is far more complicated. I have two "streets" with a container entity moving moving along each of them. This streets have both fillers and emptiers, and I wish to write in excel every time a container entity goes from a filler to an emptier and how long that took. For example if my container on street 1 goes from filler_2 to emptier_6 I would like a row in excel with those 3 columns: starting filler, ending emptier and time between. 

I achieved this without problem for one of the streets (adding add on process triggers to all of the fillers and another for all of the emptiers). The thing is when I add this same processes to the emptiers/fillers of street 2, my excel goes crazy and obviously because of two reasons: the time I register to calculate time between is being updated in both streets every time a container goes out of an emptier, and exactly the same happens with the row that this 3 things have to be written in the excel.

I don't know hoy I can manage to construct the variables time and row_count without them getting confused and hence my excel becoming useless.

Thanks, again!!!

Share this post


Link to post
Share on other sites
On 2/19/2020 at 3:34 PM, GFurtado said:

I would suggest to expand this model I sent before by creating new states inside your ModelEntity.

  • Two states when the entity leaves a station (one updates the station name and one updates the time it left).
  • A state when the entity enters a station.
  • Maybe another states registering how many rows in your sheet were written.

The columns of your sheet would be ModelEnity.FromStation, ModelEntity.ToStation and (ModelEntity.TimeLeftStation - TimeNow).

Let me know if you need help building this model.

Share this post


Link to post
Share on other sites

×
×
  • Create New...