ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Cost function as a PFM in a Experimenter
Hi Guys,
I want to create a cost function and use it as a Performance Measure (PFM) in an Experimenter with several scenarios (variable = batch size). My model contains several processors, so I want to create a lable “cost” for each one: cost = (Processtime + Setuptime)*cost rate. Which command let me get the process and setup time (in numerical form) of the processor ? If I use “getstatenum” command, how can I specify the state? I tried to use it in the “OnSetupFinish” and “OnProcessFinish” triggers, but it gives me all the simulation run time and not the setup/process run time. Thanks for ur help Simon |
#2
|
||||
|
||||
Simon,
The states you are looking for are STATE_PROCESSING and STATE_SETUP. The following line of code will get you the time an object spent processing as of it's last state update: getnodenum(rank(state_profile(myobject), STATE_PROCESSING)) States are updated on an object everytime the object changes states, the stop button is pressed, updatestates() is called, or updatestate(myobject) is called. If you are using a visual tool to display the data then you will want to be aware of the states being or not being updated. However, if you are calling this at the end of the model run then you probably don't need to worry about it. Good Luck, Brandon
__________________
thats not normal. |
The Following User Says Thank You to Brandon Peterson For This Useful Post: | ||
Simon Farsah (06-23-2008) |
Thread | Thread Starter | Forum | Replies | Last Post |
[Suggesiton] UNDO function | KelvinHo | Gripes and Goodies | 10 | 05-23-2008 01:58 AM |
Print function | David Chan | Gripes and Goodies | 0 | 05-21-2008 09:38 PM |
Cost analysis? | mallik | Q&A | 5 | 04-07-2008 10:54 AM |
max() is a deprecated function; use maxof() instead! | Lolke Koopmans | Gripes and Goodies | 0 | 02-25-2008 02:45 AM |
How to report setup cost? | jbruxelle | Q&A | 1 | 09-05-2007 12:07 PM |