05-22-2015 09:01 AM
Hello everybody,
i have three differents tranporter that share a few tracks. the destination of the three tranporters is the same but they must take diffetents ways. these differents ways is the same always. for example tranporter (ruta5) must have these way source->track->T->track2->track3->track4->track5->track6->track7->track8->P->track13->track14->track15->track16->track17->drain.
i dont know where i have to put the Method control to do that.
the other tranporter Ruta11 and Ruta10 has different routs
thank you very much
Solved! Go to Solution.
05-22-2015 09:23 AM
You can use the method 'setRoute' of the Transporter to assign a specific route.
05-22-2015 02:18 PM - edited 05-22-2015 02:22 PM
Michael thank you for replying so quickly but i dont know how where to use this method.
sorry but i am a beginner at PlanSimulation...
05-25-2015 03:10 AM
05-25-2015 06:36 AM
you need to use the absolute path to tableFile in the method:
.Models.Frame.TableFile
Steffen Bangsow freelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net | ![]() |
05-26-2015 03:34 AM
thanx!.
i have changed it, also i change the type of the first column to object but it works just for the first tranporter Ruta5 that the source generate for the others it does not work. i think it is becuase i put in the control of Ruta5 the next method
is
do
.MUs.Ruta5:1.setRoute(.Models.Frame.TableFile);
end;
here i specify for Ruta5:1, i dont know how to put it for all the transporter that has the name Ruta5.
another thing, in the source i have put in the exit control method2
is
do
if @.name="Ruta5" then @.destination:=.Models.Frame.P;
end;
end;
if i delete it, the tranporter does not go in the route that i have specified in TableFile neither at the first time
05-26-2015 04:34 AM
you need to set both, the destination and the route, but you can combine it in the exitcontrol rear of the source:
is
do
if @.name="Ruta5" then
@.destination:=.Models.Frame.P;
@.setRoute(TableFile);
end;
end;
.MUs.Ruta5:1 is only the first generated Ruta5.
Steffen Bangsow freelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net | ![]() |
05-26-2015 05:30 AM
Thank you very much Steffen, it Works!!
05-28-2015 02:50 AM
Hi Again,
i have done a little change of what i had, because the transporters that i create i have to do it just one time and they should move all the time. so i create a method Init that create all the transporters.
is
do
deleteMovables;
.MUs.Ruta5.create(Track,1.5);
.MUs.Ruta11.create(Track,3);
.MUs.Ruta10.create(Track,4.5);
end;
then for defining the routes of each tranporter i have created a method "defineRoutes"
is
do
if @.name="Ruta5" then
@.destination:=.Models.Frame.P;
@.setRoute(.Models.Frame.TableR5);
elseif @.name="Ruta10" then
@.destination:=.Models.Frame.R;
@.setRoute(.Models.Frame.TableR10);
elseif @.name="Ruta11" then
@.destination:=.Models.Frame.M;
@.setRoute(.Models.Frame.TableR11);
end;
end;
the issue is that if i put this method defineRoutes as a control in the exit rear of "truck" it does not wotks well because the transporter dont follow the correct routes, but if i create a sensor on "truck" and put the method defineRoutes as control of the sensor, it works well, all the transporter follow the corresponding paths. i dont know why this happens, any explanation please.
i will attach the two scenarios