I want to know if there's any chance to control the outflow of a mixer. What I want is to fill the mixer till it's filling level is 80% and close all the inlets, then open the outlet and set its outflow rate but I have the error shown in the image.
Thank you in advance.
Solved! Go to Solution.
The currentOutflowRate attribute of the Mixer is indeed not an attribute which you can set, but this attribute is used to monitor the current outflow rate of the Mixer. So you can use this attribute to check what is currently flowing out of your Mixer.
If you want to change the maximum outflow rate of your mixer you can that by changing the attribute OutflowRate of the mixer.
Alternatively you could set the OutflowRate of the succesing pipe Objects.
Hope this clears things up.
By the way, the behaviour you want to use is standard behaviour for the Mixer object.
You can set a Product Amount on the Mixer dialog to set an amount of end-product you want to create in the Mixer. This is set to -1 as a standard option, and will as such fill to the maximum capacity of the Mixer.
If you would enter a value here that is 80% of your Mixer Volume the Mixer will gather materials in the ratios defined in the MaterialsTable to create a Batch of the defined Product Amount. When all the materials have been gathered, the mixing procedure will start and afterwards the Mixer will empty out completely before requesting new materials. This requires no coding at all!
If you would close your entrances at 80% fill rate and your Mixer is expecting another 20% your simulation will stop. This is because of the Product Amount defined your Mixer Object will expect it requires more materials. It will only start processing when it has gathered all materials in the expected volumes!
So in your case, I would set a product Amount and you should be able to get rid of the Methods all together!