Hi,
How to change the max flow rate of a mass flow conveyor using code?
Regards,
Arun KR
Hi,
How to change the max flow rate of a mass flow conveyor using code?
Regards,
Arun KR
The max flow rate is derived - you can't set it directly as a conveyor property.
It's just maxDensity*EffectiveWidth*speed though, so you can choose and set the width (and width rule) and speed to achieve the correct flow rate.
The following user command accepts the conveyor, flowunit name and desired max flow rate and looks at the width settings of the conveyor in order to calculate and set the speed.
Until the mass flow calculator is fixed to account for the width value and rules you should probably use this if you're not using the physical width:
//setSpeedFromMaxFlowRate(<conveyor>,<flow unit name>,<max flow rate>) Object conveyor=param(1); string funame=param(2); //flow unit name double maxrate=param(3); treenode flowunit=Model.find("ConveyorSystem>variables/flowUnits/"+funame); if (!flowunit) { mpt("Flow unit "+funame+" not found in the conveyor system definition");mpr(); return 0; } double Ux = flowunit.subnodes["length"].value; double Uy = flowunit.subnodes["width"].value; int isRound = flowunit.subnodes["isRound"].value; double R = isRound ? 2.0 / sqrt(3.0) : 1.0; double maxDensity = R / (Ux * Uy); double width=conveyor.getProperty("Width"); string rule=conveyor.getProperty("WidthRule",GET_PROPERTY_FLAG_STRING ); double widthval=conveyor.getProperty("WidthValue"); double effectiveWidth=width; //rule ="Conveyor Width" if (rule=="Number of Lanes") effectiveWidth=widthval*Uy/R; else if (rule=="Virtual Width") effectiveWidth=widthval; else if (rule=="Single Lane Flow Unit Distance") effectiveWidth=Ux/widthval*Uy/R; else if (rule=="Single Lane Gap") effectiveWidth=Ux/(Ux+widthval)*Uy/R; else if (rule=="Percent of Upstream Width") { mpt("Percent of Upstream Width - unknown effective width");mpr(); // unknown return 0; } double speed=maxrate/effectiveWidth/maxDensity; conveyor.setProperty("Speed",speed);
I've not found the definition for "Percent of Upstream Width" - whether that just means physical size or the effective width of the upstream conveyor (and what if there are more than one with different width rules?).
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved