Cancel
Showing results for 
Search instead for 
Did you mean: 

Transporter Time measurement

Creator
Creator

Hi everyBody,

i have a transporter that make always the same route, i wanto to know how many times the transporter make this route per day, and the time for each one.

it starts at the SensorID 6, for me this sensor is the reference of time. i want to make this sensor as the point where the transporter stop after 24 hours or when it finishes the route but also i dont know how ...

i want also to simulate that this tranporter pull 4 trollies behind but i dont know if its possible to do.

any suggestion

thanx in advance

 

12 REPLIES

Re: Transporter Time measurement

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you could use a user defined attribute in the transporter for store the number of rounds. Just increment the value after each start of the transporter at Sensor 6.

 

To get the number of rounds you can use e.g. a TimeSequence. Record the value of the user defined attribute with an interval of one day. Or you use a Generator to call a method with an interval/ delay of one day.

 

You can define the transporter as Tractor (see menu of the Transporter). Then you can hitch other transporters (e.g. using the collision control of the tractor).

Look here for an example:

 

http://www.bangsow.de/detail_en.php?id=489

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

Re: Transporter Time measurement

Creator
Creator

thank you Steffen_B. i tried to apply the metho of creating a wagon but i couldnt do it.

i have changed a little bit the self.collisionControl of the tractor but it doesn't work

 

is
i:integer;
car: object;
do
-- hitch wagons behind the tractor
-- move after hitch-time
if self.~.backwards then
car := self.~;
for i:=1 to 2 loop
-- is there a wagon?
if not isVoid(car.rearMU) then
car.rearMU.hitchFront;
car:=car.rearMU;
else
exitloop;
end;
next;
-- wait(self.~.hitchTime);
self.~.backwards:=false;
self.~.stopped:=false;
end;
end;

 

in this code i dont understand this condition "if not isVoid(car.rearMU) "

and i dont know where to change or set up the hitchTime.

 

Re: Transporter Time measurement

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

First: to hitch a wagon, this must be located directly infront or behind the transporter. So you have two options: the wagons drive against the tractor or the tractor drives against the waiting wagons.

 

My example deals with the second option. You need to stop the first wagon (see init-method) and let all wagons and the tractor drive backwards against the first transporter. In the collision control then you can hitch all wagons (I have changed your version a little bit). In the sensor controls you can only stop the tractor (you can check the transporter with @.isTractor).

 

isVoid is an old syntax, use instead:

if car.rearMU /= void then

 

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

Re: Transporter Time measurement

Creator
Creator

hi Steffen,

thank you very much, it works perfectly. i just have a question about a method that you have changed, its the method of the sensors

(SensorID: integer)
is

do
if @.isTractor then
@.stopped:=true;
@.startPause(55.2);
waituntil @.operational prio 1;
@.stopped:= false;
end;
end;

 

i dont understand very well the meaning of @.operational prio 1.

 

another thing can you recommend me an example to do the first part of my problem, i mean the time measurement, i dont know which attribute of tranporter i have to use or how to

 

thanks in advance!

 

 

Re: Transporter Time measurement

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you pause the tractor, the complete train is paused. If you set stopped:=false in the tractor during the pause, the tractor starts without the wagons. So you need to wait until the pause is over (waituntil @.operational prio 1; see help --> operational) to start the complete train.

 

Have a look in the attached model for your first problem. I added two user defined attributes into the tractor. These attributes I set in the method stop...

 

 

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

Re: Transporter Time measurement

Creator
Creator

thank you very much for the explanation Steffen.

i have put a Timesequence table to record the values of startRuta or timersRuta, but i caouldn't get it. it always gives me a zero value, i dont know why...

 

another time thank you very much for your help

 

 

Re: Transporter Time measurement

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you cannot record timesRuta with the timesSequence, because it is a list.

 

You cannot adress the class of the tractor in the TimeSequence, you need to adress the instance in the frame. The class itself dont collect the data, you want to show.

 

To record e.g. startRuta, you need a reference to the tractor in your frame. I have inserted a globale variable into your frame (tractor: object). In the init you can set the reference, when you create the tractor:

 

tractor:=.MUs.Trans_3A.create(Track,591);

 

Now you can use this variable to access the attributes of the tractor for the TimeSequence.

 

 

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

Re: Transporter Time measurement

Creator
Creator

Thank you very much Steffen!

anther question please , to visualize the timesRuta lista , how can i do it? i want it to know how mnay round the tractor have done at the end of the day

Re: Transporter Time measurement

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can use the global variable to access the list inside the tractor. Try to use it as datasource for a chart object.

 

 

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