cancel
Showing results for 
Search instead for 
Did you mean: 

InitStat

Hi,
I would like to have an information: I'm trying to obtain the throughput per hour of my simulation.
I noticed that, if I run the simulation, the drain statistics consider the throughput from the start of the running. But in this way the throughput value will reach the real throughput value in a long time. I would like to collect the drain statistics after the first MU has reached it (the drain). So I used the InitStat method in the entrance controls of the drain but in this way the statistics are resetted every time a MU arrives in the drain. Is it true? How can I call the initStat method only the first time the first MU arrive in the drain?

 

Thank you very much.

Marco

7 REPLIES

Re: InitStat

Phenom
Phenom
you could try a flag (global variable type Boolean, start value: false)

if flag = false then
?.initStat;
flag:=true;
end;

So it will be called only once.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: InitStat

Phenom
Phenom

Are you sure to get the real throughput after the first Mu passed the drain ?

 

Usually it takes some (simulation time) for ramping up the performance

 

Have a look here how to reset statistics after  set ramp up /warm up

 

http://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/warmup-amp-reset-statistics/m-...

Re: InitStat

Hi Steffen_B, Sorry but I'm not very expert! I'm a self-taught! I understood that I have to write your message in the method but what is "flag"? And how I link "flag" and the bolean start value (false) to my MU?

 

Hi Simulator, I apologize for having not explained myself very well. I wanted to say that if I run the simulation the real throughput value is reached after a lot of days because the first MU takes at least 1 day to reach the drain. So I thought that the reason was that the simulation calculates the throughput averaging the istantaneous values of the throughput considering also the first day in which no MU arrives to the drain. Is it true? Thank you for the link you posted me but I had already read it and it's not very useful because if I change something in the simulation I have to run it always at least one time to find how long is the warm up to put it in the method.

 

Thank you both of you for your help.

I wait for your replay.

Re: InitStat

Phenom
Phenom
a "flag" or "switch" is only a global variable, there will you find the settings: data type, start value and you need to name the global variable

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: InitStat

Ok,thank you. I forgot to put @. before the word "flag" in the method. But the method doesn't switch the flag in "true value" after the first MU passes. Infact the total throughput has always the same value= 1. I apologize if i couldn't post photos.

Re: InitStat

Phenom
Phenom
please do the following:
- insert a global variable into your frame
- name it "flag"
- set as data type: Boolean
- activate initial value
- insert false as initial value

than this code should work:

if flag = false then
?.initStat;
flag:=true;
end;

-- no @ needed

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: InitStat

Wow! Great! It works! Now I have to think about the results because I don't understand how the throughput stats are plotted.
Anyways thank you for your help.