Cancel
Showing results for 
Search instead for 
Did you mean: 

Shift Calender problem with endsim method

Dear Community,

 

i'm trying to use the shift calendar (highligthed) in my model as can be seen below:

 

Shift calendar.png

 

The problem lies in the fact that if i use 2 shifts (that not covers the whole day) the simulation end before it's finished; this can be easily seen because "MatOrder" (highligthed) is the total amount of articles that has to be done and "ArticleTotOut" (highligthed) the total article passed by drain (so the one actually produced).

As you can see the number are not equal and this is easy to be noticed because there is a MU stucked in the "Qualita" (highligthed) frame.

For some reason the "endsim" method (highligthed) is called (i know that because i get a pop up window any time that is triggered); the only reason that i can think is that the suspended method is empty and everything stops in the night when there is no shift so the endsim method, maybe, trigger itself because nothing is happening but this is just an idea.

Thanks for your help.

5 REPLIES

Re: Shift Calender problem with endsim method

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
do you have set an end in the eventController?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Shift Calender problem with endsim method

Hi Steffen,

yes; i saw one of your older post here in the forum and actually i've two version (both working)

Second version (actually used)

if prodottoFinito.StatNumIn + root.Qualita.ScrapStore.NumMU = MatOrder
    eventController.end:=eventController.simTime+0.001
end

First version

if (ProdottoFinito.StatNumOut + root.Qualita.ScrapStore.NumMU)+1 = MatOrder
	eventController.end:=eventController.simTime+0.001
end

Re: Shift Calender problem with endsim method

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
maybe you need to "reset" the eventController.end value to 0 in the init-control

eventController.end:=0
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Shift Calender problem with endsim method

Dear Steffen,

it worked; thank you so much.
Just for my curiosity, can you explain me why it worked?

Re: Shift Calender problem with endsim method

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
the eventController doesn't reset the end value, that you set in a former experiment run, so it can be happen, that the "old" end of the eventController is reached before all your parts are processed
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net