I am simulating a process that runs for hours and would like to be able to manually cause a breakdown if I see a portion of the process being too busy.
Is this possible? I have version 7.3.6
I am simulating a process that runs for hours and would like to be able to manually cause a breakdown if I see a portion of the process being too busy.
Is this possible? I have version 7.3.6
The most simple way to do what you want is to call the "stopobject()" command on the object when you want to break it down and "resumeobject()" when you want it to restart. You can execute the commands from a script window if you are just testing things out or you could make a GUI with breakdown and resume buttons that execute the code when pressed.
***If you already have breakdowns that occur on the machine then you will want to use the same method being used by the breakdown method if it is different than above.
I received this error when testing your command
Flexscript Error VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/ScriptConsole/Script>script line 2 unknown variable "Machine1"
Warning VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/ScriptConsole/Script>script line 2 Too few parameters in call to stopobject
@Wilfredo Salinas, stopobject() takes at least 2 parameters (see documentation here).
The first parameter is a valid reference to your breakdown object. In your case, Machine1 is not a valid reference. There are many ways to get a reference to an object in your model, but from the script window you may want to use the node() command.
The 2nd parameter is the state you want the object to be in while it is stopped. STATE_BREAKDOWN is one example. These state macros all start with STATE_ and you can check the autocomplete as you type it in the script window for more examples of possible states.
So a usage example for calling stopobject() from the script window, if your processor is named "Machine1" and is at the root level of your model (not embedded inside some other container object):
stopobject(node("MODEL:/Machine1"), STATE_BREAKDOWN);
Unfortunately with you're code you will also get a syntax error. You're missing a close parenthesis after the end quotation mark. ;)
5 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