Hi guys. Is there a delay command like "delay(minutes(2),STATE_PROCESSING)" and why not? Not in process flow, just hard code.
It would be very convenient.
Hi guys. Is there a delay command like "delay(minutes(2),STATE_PROCESSING)" and why not? Not in process flow, just hard code.
It would be very convenient.
If you think a delay command is needed in Flexsim, then you shouldn't ask a question why it isn't. Much better is it to post an idea. The users can vote and support the idea.
@Enrique Elizaga Until now we have never had the need for such a command. So could you explain exactly what you want to use it for? Then we probably can give you an answer on how you can do it.
For now check out the stopobject() or the senddelayedmessage() commands. They give you probably all the functionality you are looking for.
@FSTModule Talumis I acknowledge this, I always use the senddelayed message, yet this implies a certain complexity if you have local variables or pointers. You have to store them inside a label, table or global variable not to lose them when for later use. The msgparam(1 to 3) does not allow pointers, arrays or bundles. Please comment.
FlexScript compiles to machine code, which is executed by the CPU one instruction at a time. When it is done executing one line, it moves onto the next line.
FlexScript code executes immediately. It is not a logic builder that runs in simulation time using discrete events being processed within the simulation timeline like ProcessFlow activities. You can't arbitrarily delay the code execution in the middle of the code based on simulation time.
If you want to write logic that delays, you should use Process Flow or senddelayedmessage().
You can convert a pointer to a number and put the number in a message. OnMessage you convert the number back to a node.
Local variables should be in a local scope. If you need them in another scope, you have to make them global. Maybe it isn't a modern method accessing local variables. Then you are able to write directly c++ code, but you are forced to compile your model.
But in my opinion, this is a totally different question then just delaying the execution of an object process and seting a state.
There is only a couple of commands. stopobject - resumeobject. An object that a stopobject command is called on is dead. The object isn't able to receive messages or send messages. The resumeobject command must be called by another active object. The delay time is event driven by a message, an user event or any other trigger.
12 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