I want to run my simulationfor 20 days.
I have sued generator with interval control
is do Days := Days +1; Source.start := 36000 +(86400*Days); Source.stop := 61200 + (86400*Days); end;
Where Day is a variable
But after one day it is not getting started again.
So please Help.
Solved! Go to Solution.
I would also suggest using the ShiftCalendar, like @Alessio stated above. What you are doing seems a bit too complicated to me. However, your approach is working for me (in Plant 12.0; also remember to set the "Interval" of the Generator to 1 day [no need to change the other values]).
You could try the following to re-start the source, after changing Start/Stop during the runtime (note that I have moved "Days := Days + 1;" to the end, because I would model it as integer-variable with initial value of zero):
is do Source.start := 36000 +(86400*Days); Source.stop := 61200 + (86400*Days); Source.timeOfGeneration := "Number Adjustable"; Source.timeOfGeneration := "Interval Adjustable"; Days := Days +1; --> variable **with initial value** 0! end;
uncheck the Blocking-checkbox of the source. Else the source will remember, when it tried to produce parts but was not able to (--> during the pause/unplanned times), and create all those MU's at once when the pause/unplanned time is over. I would in that case recommend putting an infinite-capacity buffer behind all sources to ensure the source is never blocked by its successors, or else the throughput may again not be as expected.