Cancel
Showing results for 
Search instead for 
Did you mean: 

simulation runs for 16hours and then error

Pioneer
Pioneer

hello, 

 

i had made a model and used track routing for various destination based on integer attributes.

 

The simulation is running exactly according to the routes i have defined in the code, but after some 16hours it doesnt follow the destination it is defined and goes on wrong track(had been running properly for last 16hours of Simulation) .

 

here is the code i have been using 

 

if @.empty and @.name="fzwe" then

               @.destination:=WE

elseif @.empty and @.name="fzint" and übergabeA5.NumMu>0 then

               @.destination:=AU5

elseif übergabeA5.NumMu=0 then

                              @.destination:=T31

elseif @.occupied then

               Switch @.cont.qt

case 11

   @.destination:=AU7

case 12

   @.destination:=AU5

case 13

               @.destination:=A3u3

case 21

               @.destination:=VZ2

case 22

               @.destination:=VZ1

else

                              @.destination:=VOID

end

end

 

Error happens sometimes at 21 hours or 16 hours or 18 hours(keeps changing every time)  and it occurs only for case 21 everytime(though before it followed the code and travelled to destination for around 290 times.Destination is a track followed by a store with capacity(300*200*10).

 

i tried to create a demo model and upload it , but the problem doesnt occue in  a  test .

 

 

Can anyone give there insights on what could be the possible reasons for this that a code suddenly stops working.

 

 

Thank you 

 

Kind Regards

Ajay 

6 REPLIES

Re: simulation runs for 16hours and then error

Phenom
Phenom

Without the model to 

 

monitor this behaviour

 

it will turn in to guessing.

 

Therefore - in your case - you should provide

 

the model with the described behaviour.

Betreff: simulation runs for 16hours and then error

Gears Phenom Gears Phenom
Gears Phenom

@Ajay_Thakur  schrieb:

Error happens sometimes at 21 hours or 16 hours or 18 hours(keeps changing every time)


Also this indicates that you have done something wrong in your model, because it should normally reproduce the same results/errors every time (unless you intentionally changed some randomseeds).

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: simulation runs for 16hours and then error

Pioneer
Pioneer

thank you for the replies

 

the different times in error was due to minor changes in the length of tracks.

 

what could be the issue with the model otherwise , which will lead to this type of error.

 

 

Sorry i cant post the model  as it is quite big and  confidential, i tried to make a sample model,but error doesnt occur on the sample.

 

 

 

Betreff: simulation runs for 16hours and then error

Gears Phenom Gears Phenom
Gears Phenom

so now the error happens every time you run the model at the same time for the same MU?

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: simulation runs for 16hours and then error

Pioneer
Pioneer

yes , the error happens at same time now . It is like the exit control code for a track works fine for some 12 hours and then it misses it and the transporter is directed in a wrong direction.

Betreff: simulation runs for 16hours and then error

Gears Phenom Gears Phenom
Gears Phenom

Maybe it would help us to take a look at your demo/example model, even if the error does not occur there. Just so we can see what methods you used etc.

And for your "real" model in the meantime: Since you know for which MU (with ID/Number X) it fails, set a debug at your case 21

if @.GetNo = X then debug; end

just so you can slowly debug through your code, and see where it goes wrong exactly (the destination is set correctly, but what happens next? At what point does the transporter take a wrong route? Are you using route weight attributes, e.g.?)

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!