I want to assign the processing times to the processor using flexscript. Can that be done?test1.fsm
I want to assign the processing times to the processor using flexscript. Can that be done?test1.fsm
The way this is generally done is to have the processors read their processing time from a global table. Then you can use flexscript to write different values to the global table.
Can you please attach an example of how that is done?
Does each processor have its own unique processing time? Or do they all use the same time?
Hi @Suhas H2,
Here's an example of what Matthew was describing. In the model, the Process Time is accessing Global Table values based on item.Type. When the model starts, the green items process slowly, while red items process quickly. Then, you'll notice that after 10 items have been processed, the Custom Code activities in Process Flow change the values in the Global Table such that red items now process slowly, while green items process quickly. Please review the code in the Processor as well as the Custom Code activities in Process Flow to understand and implement this in your models. Thanks!
How to access Global Table:
How to dynamically update Global Table (and, effectively, Process Time):
Thanks for the reply...
What if I have 50-100 Processors in line? All this have to be done for every single of them?
Is there any way to do using flexscript? I tried this code but not getting desired output.
The process time isn’t just a value. It is the return value of a script by itself. The script is stored at a node.
You can copy the node of the script to every processor. If you must transfer the same script code of the process time from an highlighted object (yellow frame) to selected objects (red framed objects) you use the tool edit selected object under the View main menu.
In the manual look at Copying and Pasting 3D Objects And Properties under the headline Using the Edit Selected Objects Tool. and especially there the text box Copy Specific Variables.
Thanks for the reply...
I agree with you on this. But can that return value of the script in processor be made dynamic by using flexscript only is my question.
You can’t directly make it dynamically. You can replace the return value by a reference as a substitute. This reference can be a table cell value, a label value, a node value. You change the reference value und thus you make the process time dynamically.
10 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