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

Sign in to follow this  
teresimio123

Need urgent help with entity destination type select from list

Recommended Posts

Aloha 

Each time my container entity enters the output of its source I am setting entity destination type "select from list". This list contains the input nodes of all the fillers, and I wish to select the destiny node based on two conditions: 1. depending how many container entities are currently in the station, in the queue, and en route to it. And 2. depending on how much contents the associated tank to that filler has. So for example, if tank 1 has 1500 metric tons but the filler has too many container entities waiting to be processed by it, then, I want my model to select the next best combination of high contents in tank + few container entities in station and queue and en route to the filler which is linked to that tank.

I guess condition number 2 is being fulfilled by the "selection goal" I placed, yet I don't know how to achieve condition number 1. I tried adding a selection condition but I don't know how to tell simio that I want to check the associated tank to the filler.

106087184_ScreenShot2020-03-05at10_18_51AM.thumb.png.258cc91ff1cef5e0a32a8c22e884b489.pngI would appreciate it very much if you could help me out :)

Share this post


Link to post
Share on other sites

I am not sure which expression to use to get the value 1500 metric tons from a tank object. I assumed that MyTank.FlowContainer.CurrentWeightCapacity expression gives what u want (it is most likely not u want, but it does not matter). If it does not you replace it with the appropriate expression. The main idea for selecting the right node just in one shot is to use the long expression below. To be able to use such an expression you should subclass filler object and define an objectreference on it. I revised your model and attached it. Again, I am fairly sure that this expression is not just you want but if you revise it accordingly it will help you choose the right node. Hope this helps you? 

Candidate.Node.AssociatedStationOverload / Candidate.Node.AssociatedObject.MyFiller.ObjectInstanceProperty1.MyTank.FlowContainer.CurrentWeightCapacity

basic_escondida.spfx

  • Like 1

Share this post


Link to post
Share on other sites

Gocken, your idea worked. I had no idea I could create an object instance to relate one object to another. this is great. I have another question, if I want to assign a number(integer state) to a tank according to the initial entity that is held in it, how would you do it? Ive tried the following (one of model entities is called cobre and my model is called Model)

1. Inside MyTank model (subclass), create a process that decides whether MyTank.flowcontainer.contents.contains(cobre)==1

2. Inside MyTank model (subclass), create a process that decides whether MyTank.flowcontainer.contents.contains(Model.cobre)==1

3. In my Model create a process that decides whether MyTank.initialcontents.initialcontententitytype==cobre

yet none of these are working for me. In the case of number 3, I get the following error "No element reference available to resolve identifier 'InitialContentEntityType'.

Can you think of another way to accessing which entity is held in my tank when I ask for it?

Thank you very much, again!!

Share this post


Link to post
Share on other sites
Posted (edited)

Greaat! I am so glad. If I were you I would define an object property (ObjectInstanceProperty1) and a state variable (say MyTankIntegerState) on "MyTank" object (subclassed one). Then, I would subclass "MyTank" object's (subclassed one) OnEnteredFlowContainer process. Place a decide step at the beginning of the subclassed process which checks "Is.ObjectInstanceProperty1". Meanwhile, do not forget to fill ObjectInstanceProperty1s of mytank objects on facility. For this,  on facility view select both mytank objects and set ObjectInstanceProperty1 as cobre. At true branch of decide step include an assign step which assigns MyTankIntegerState state variable as MyTankIntegerState+1 (or 1 if you want to see only 1 if there exist any cobre on flowcontainer. You can decide whichever works best for you) and at the false branch again include an assign step which assigns MyTankIntegerState=0 (If you want to set it to zero?). In order to test whether this work you can place two statuslabel (with expression "MyTankIntegerState") on facility view each attached to each mytank objects to see the values assigned. I can make these changes to the previous model and attach the modified one here?. Hope it works?

Edited by gocken

Share this post


Link to post
Share on other sites

Gocken, once again great idea!! I changed a bit my model so for now I don't need your help. Surely I will be having doubts in the modeling so sorry and thanks in advance if I bother you with questions!!

:)

Share this post


Link to post
Share on other sites

It is great to hear that you are doing well with your model. No worries with questions, I will do my best ✌️

  • Thanks 1

Share this post


Link to post
Share on other sites

Aloha Gocken! remember when you showed me to do the following:

Candidate.Node.AssociatedStationOverload / Candidate.Node.AssociatedObject.MyFiller.ObjectInstanceProperty1.MyTank.FlowContainer.CurrentWeightCapacity

The thing is my filler has now 5 object instance properties, and I need this expression "Candidate.Node.AssociatedObject.MyFiller.ObjectInstanceProperty1.MyTank.FlowContainer.CurrentWeightCapacity" to change from one objectinstanceproperty to another depending on certain conditions.

For instance if the number of my container entities containing one type of entity is greater than 30, then "Candidate.Node.AssociatedObject.MyFiller.ObjectInstanceProperty1.MyTank.FlowContainer.CurrentWeightCapacity" should now be "Candidate.Node.AssociatedObject.MyFiller.ObjectInstanceProperty2.MyTank.FlowContainer.CurrentWeightCapacity".

 

I have tried creating variables to reference the expressions but nothing is working for me yet. Can you think how to reference those object instance properties?

Thanks!!! :)

Share this post


Link to post
Share on other sites
Posted (edited)

This requires a little different solution approach. But, we need a little more information? Maybe I need your model as well. If it is confidental you can send me it as pm. For example in the case of your condition is satisfied (>30) is ObjectInstanceProperty1 property replaced by ObjectInstanceProperty2 on both filler objects simultaneously? Are the ObjectInstancePropertys the same for both filler objects? etc. 

Edited by gocken

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...