Jump to content
Simio Forum

Recommended Posts

I have a model of tanks that get filled. I have 4 tanks that get filled from the source, then these 4 tanks empty to 2 smaller tanks and then finally these 2 tanks go to the sink. I have it setup so that each of the 4 tanks individually must be full before they empty to one of the 2 smaller tanks through add-on processes. However, I am unable to figure out how to make it so that nothing goes to the 2 smaller tanks until all 4 of the larger tanks are full. To further complicate things, an even amount from each of the 4 larger tanks must go to the 2 smaller tanks.

Does anyone have any suggestions on how this can be accomplished?

Any help is greatly appreciated!

Link to post
Share on other sites

Create processes that are triggered by YourTank.Full and YourTank.Empty events and set the Output@YourTank.FlowRegulator.Enabled to True or False to open or close the tank's valve. Silimar to how I did in this other post.

Also, Output@YourTank.FlowRegulator.CurrentMaximumFlowRate might be useful if you're having trouble your tank's flow rate.

Keep us posted if you need more help.

 

 

Link to post
Share on other sites

Thank you GFurtado. I have the add-on processes to handle the flow regulator. The issue I am having is that I need all 4 tanks to be full before any of them start to empty. I kind of got it doing close to what I want by having a wait step before assigning the output flow regulator to true.

The other complication is that I need to have an even amount from each of the 4 tanks, empty into the 2 smaller tanks (still working on how to handle this).

Thanks for the help!

Link to post
Share on other sites
37 minutes ago, nbiviano said:

The issue I am having is that I need all 4 tanks to be full before any of them start to empty. I kind of got it doing close to what I want by having a wait step before assigning the output flow regulator to true.

There's a lot of ways to solve this. Wait step is one of them. I made an example using the Monitor element (check the attached model).

When the monitor sees that all four tank are full, it runs a process to empty them.

 

39 minutes ago, nbiviano said:

The other complication is that I need to have an even amount from each of the 4 tanks, empty into the 2 smaller tanks (still working on how to handle this).

If the Split Allocation Rule property in the Output Flow Control of your flow nodes is set to Evenly If Possible, then you shouldn't be having this problem, unless your pipe is messing up with the math.

But if want to force a value to transfer, you could create another monitor monitoring Output@YourTank.FlowRegulator.CurrentVolumeFlowOut that shuts the valve when your desired volume flows out.

FillingTanks.spfx

Link to post
Share on other sites

So new question, what are the units of an expression in a status plot? I am using this expression:

Input@FlowSink1.FlowRegulator.CurrentVolumeFlowIn.Rate

I would expect that rate to be the set initial maximum flow rate however the number I get from that expression is much less than what I assigned as the flow rate. Unless it is not in the same units that I have set in the flow regulators and project.

Link to post
Share on other sites

It should be the default unit Cubic Meters per Hour.

  1. If you assign a new unit to an object property, Simio's backend will continue to calculate using the default unit;
  2. Watch out for bottlenecks. Maybe there is a low flow rate node holding the whole system.
Link to post
Share on other sites

Interesting. Thanks.

I have checked the entire system and all but the last step have the same flow rate, as it should be. The last step has a slower flow rate but what is interesting is that the simulation says it is going to take far more years to complete than if you just calculate by hand what it should take to drain at the slow flow rate.

My apologies as I am not as well versed in the flow library as I am the standard library, but I set up an output statistic to get the flow rate in gallons per minute using the following:

Input@FlowSink1.FlowRegulator.CurrentVolumeFlowIn / (Run.EndingTime - Run.WarmUpPeriod)

This returns a much smaller value than what the flow rate I put in (all but last step are 140 gpm, last step is 11 gpm, output statistic gives 1.6 gpm). Is this formula is incorrect?

Link to post
Share on other sites

I have been able to get everything to work so far with the exception of this last issue. At the very last step in this system not all 4 tanks will be full but I need to have them empty. However my model gets stuck and won't empty. Below is where the model ends but I need to override my logic to wait for all the tanks to be full at this point. I have tried using monitor, state variables, wait steps, scan steps and it still stops at this point. Any ideas?

image.png.3b8c642acc5471899d6527e2ad28cda6.png

Link to post
Share on other sites

In that picture yes most of them were closed (tanks 2-4 have a 0 next to them). I did find that the monitor wasn't triggering correct and fixed that so it gets a little further but now stops at this point with the flow nodes all open:

EndState_2.jpg.3f2cb88ee13a5c35a8b94fe7a6fa6567.jpg

I do have a an execute system flush step that gets executed to enable all the flow nodes. I will continue to go through the model trace to see if I can find something in there.

Link to post
Share on other sites
×
×
  • Create New...