ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-19-2008
Gavin Douglas Gavin Douglas is offline
Flexsim User
 
Join Date: Feb 2008
Posts: 65
Downloads: 1
Uploads: 0
Thanks: 27
Thanked 1 Time in 1 Post
Rep Power: 152
Gavin Douglas is on a distinguished road
Default Experimenter: Performance Measures

I think I have the experimenter figured out for the most part. However, I’m having a problem setting it up to capture the correct data. I want to know how much time varies from scenario to scenario to move, say.... 45 flow items to a sink. So when I view results, I should see sim time varying across different scenarios. Do I make sense <crickets chirping>?

Thanks
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502
  #2  
Old 06-19-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 298
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default

Sure you make sense.
You're probably running into a problem when there are no more events to do, it stops running the model. To make the model run forever, execute code like this in an OnReset trigger somewhere (or Tools>Model Triggers>On Run Start):
Code:
createevent(model(),2147483647,1,"run model forever",model());
What I would do is set the simulation end time in the experimenter to be much larger than I think the model will ever take to run (2147483647 time units), then record the node Sink>stats/content/stats_contensince. If there is other stuff happening after all the items enter the sink, use an OnEntry trigger in the sink to somehow disable them, maybe by closing all the ports in the whole model.
  #3  
Old 06-19-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

All,

The reason Alex is using 2147483647 as the number is that this is the highest signed value that an integer can have. So trying to set the value of an ingeter higher (say by adding 1) would result in getting a negative value as you wrapped around to the lowest value.

Flexsim uses a double value for the event times so the largest value possible is 1.79769e+308. This should be more than is ever required.

Brandon
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
Alex Christensen (06-19-2008)
  #4  
Old 06-19-2008
Gavin Douglas Gavin Douglas is offline
Flexsim User
 
Join Date: Feb 2008
Posts: 65
Downloads: 1
Uploads: 0
Thanks: 27
Thanked 1 Time in 1 Post
Rep Power: 152
Gavin Douglas is on a distinguished road
Default

Yes, I know the upper bounds of the sim time for the model...no problem. Sim time will drop from the upper bounds after each senario is run. What do I put under the performance measure tab and what other steps do I need to do (say in the sink) to make this happen? Oh yes, nothing happens in the model once 45 items enter the sink (there are no other flow items).
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502
  #5  
Old 06-19-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 298
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default

For this specialized of a data capture, you'll have to write your own picklist option for the Performance Measure, something like this:
Code:
/**Last content change of an individual object:*/
/** \nObject Name: */
string objname = /**/"Sink1"/**strlistpath:MAIN:/project/model*/;
treenode current = node(concat("/", objname), model());
//pt(getnodename(current));pr();
//pt(getnodename(node(">stats/content/stats_contentsince",current)));pr();
return getnodenum(node(">stats/content/stats_contentsince",current));

Last edited by Alex Christensen; 06-19-2008 at 01:29 PM. Reason: details
The Following User Says Thank You to Alex Christensen For This Useful Post:
Lars-Olof Leven (06-19-2008)
  #6  
Old 06-19-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

There is an OnEntry picklist option called "Stop the Model Run or Replication" that was intended for these types of situations.
  #7  
Old 09-04-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Question Performance Measures - Global Table

I am trying to get the mean value of a column of data in a global table using experimenter.
edit: I think I solved my problem. Thanks anyway.

Last edited by Yasemin Vatandas; 09-04-2008 at 01:47 PM.
  #8  
Old 09-06-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Question Run time and warm up time as experiment variables

Hello,

it's me again with a question about the experimenter.
Is it possible to define simulation run-time and warm up time as experiment variables?
I can select them in the tree view and assign values but it doesn't work properly, I can't make the simulation run for varying durations in each scenario.
Has anyone tried something similar to that before?

Thanks.
  #9  
Old 09-09-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi Yasemin,

Here is a simple model to show how to do this. Check the code in the Start of Replication in Experimenter window.
Attached Files
File Type: zip change replication end and warmup time.zip (72.9 KB, 276 views)
__________________
Best,
Alan
The Following 4 Users Say Thank You to AlanZhang For This Useful Post:
Yasemin Vatandas (09-10-2008)
  #10  
Old 12-16-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default

Thanks for the code. Unfortunately, I got one error with this code. I want to use this to increase the warm up time successively while remaining the simulation time a the same. Therefore Iadd the same amount of time to both warm up time and simulation end time by the start of every scenario (not replication). The Output of every scenario stays about the same (slight differences comes due increased warm up time), but the processing state reduces with the longer warm up time. I guess that the output will correctly computed regarding the constant simualtion time, but the processing state is corresponds to the stoptime. And the longer the stoptime is, the lower will the processing time be.

Does anyone know the reason for this?

Thanks



All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.