Cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with forward MU to different successor based on their names

Experimenter
Experimenter

Hello guys,

I really need help. I'm student of mechanical engeenering and ,in this moment, i'm working on my undergraduate thesis base od simulation in Plant Simulation.
My deadline is near so I need your help Smiley Happy
I have problem with exit control of proc "Lakiranje". I need to forward my product to different successors based on their names, but method "Razvrstavanje_dijelova" shows me some error.
I'm really new in this, and i can't find solution for this problem. I belive that it can be resolved in 2 min, but for me finding of solutions keept me occupied for few days.

And excuse me for croatian name of process. I hope that will not be problem.

11 REPLIES

Re: Problem with forward MU to different successor based on their names

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

try this for the "red" line:

 

( r: object) : integer

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

Re: Problem with forward MU to different successor based on their names

Experimenter
Experimenter

unfortunately, nothing. :/

Console shows me this message : "Error in method '.Komponente.Kučište_DOBRO.Razvrstavanje_dijelova' in line 4: A 'void' cannot accept the method 'Name'." 


I tried function inspect @.name and the result was the same.

Re: Problem with forward MU to different successor based on their names

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I cannot edit your model, can you post your changed model again?

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

Re: Problem with forward MU to different successor based on their names

Experimenter
Experimenter

I changed only red line. 


Re: Problem with forward MU to different successor based on their names

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I'm sorry, but I dont get any failure

 

But I guess your method Razvrstavanje_dijelova is wrong (may be a @.move is missing), there is no movement behind this station (remember: you need to move each MU in the exit control --> else branch).

 

Can you post the content of this method?

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

Re: Problem with forward MU to different successor based on their names

Experimenter
Experimenter

This is code of method Razvrstavanje_dijelova.

 

(r : object) : integer
is
do
if @.name="Kučište_nakon_probijanja" then
return 1;
elseif @.name=".MUs.Kučište_l1" then
return 2;
elseif @.name=".MUs.Kučište_l2" then
return 3;
elseif @.name=".MUs.Sve_za_1_impeler" then
return 4;
elseif @.name=".MUs.Sve_za_1_impeler1" then
return 5;
elseif @.name=".MUs.Sve_za_1_impeler2" then
return 6;
elseif @.name=".MUs.Razrez_plocica" then
return 7;
end;
end;


Re: Problem with forward MU to different successor based on their names

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
remove .MUs. in the MU names (this is the path)
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Problem with forward MU to different successor based on their names

Experimenter
Experimenter

again nothing. I tried that earlier today and now again, and i get exactly the same console error like i wrote in the previous comment.

 

I really don't get where i made mistake. :/

Re: Problem with forward MU to different successor based on their names

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you cannot start the method "standalone" in the editor. In this case is @ void and you get this error. You need to test it as exit control --> set a break point in the method and let the simulation run --> if the MU calls the method --> the debugger opens --> you can test your method (e.g. with F11)
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net