/* called by: entrance ctrl of the object 'track'
$ T& G3 N$ ^7 [*/1 D- D5 s$ z1 I& B$ n) X
is0 M9 ^1 Y) s5 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; R8 y# z& ~# v1 N: [9 \8 h
do/ C2 T% C8 z; _% o3 g' y
Lan := rootfolder.Internal.Tools.AOLlanguage;! h# K' f3 a( f6 V4 y* [. @
if current = @.Destination -- else return0 _# i+ }+ i9 S0 l) x3 R
then @0 P, H& e, O4 d
@.Destination := void;
' X W# z8 l0 A3 `1 H5 W if @.occupied then
& r% z! P* r$ w5 _8 u% s part := @.cont;8 j: H2 Z' h6 C" w" i+ }' {& r9 C
@.transpOrder := void;
9 X8 R, v8 r$ U' J9 M# a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 |' w [- h# o# `( C
@,root.eventcontroller.simTime);
5 i$ [" P! w) f+ U" q @.HasOrder := false;
P% M' E# ]0 H$ Z3 Z9 { @.DrivingHome := true;& E/ q4 R, h3 j# x6 l. A( P
rgManager.tryToStartTransOrder;
' Q4 c/ D( }- f" O if @.Destination = void
6 d9 Q W) ~' j" f# N" M then -- no transport order for vehicle @5 l* F6 y) W% m, Q8 F0 I' g
@.Destination :=
0 }' \; h3 s9 ]$ E" S rgManager.nearestFreeStation(@,track.~);0 S; s5 F% F4 T- l. a \
newDirection(@); % N+ @* H2 [8 j2 I
if @.Destination /= void then" A: s2 c! D& Z
@.Destination.NumReservation :=
2 n9 M' y- Q2 N, C% q1 ?- g @.Destination.NumReservation + 1;) z$ k1 b4 E" V+ M K& E
end;5 F6 n! x- @; l! g4 f
@.CurrIcon := "drivingHome";
?$ K% U; T6 t3 z @.DrivingHome := true;1 B( ?4 h; ]4 {7 N O
end;
2 H2 L5 t. M, X, x else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 e& _) Y& g0 t/ {9 `4 V+ w
part := @.transpOrder;& g1 _; z1 |# |2 V7 z
part.move(@);-- load part+ l+ l. O, D* P! g
@.CurrIcon := "load";6 t# _* F ?# p' Q$ S$ w
GlobalDistObj := part.globDestination;
2 D* L4 A2 K: `1 l- p/ Y5 O assignLObj := rgmanager.rgAssignL;$ Y# d; |5 @% v$ w t1 o* P2 e
row := assignLObj.getRowNo(GlobalDistObj);& W2 k: z" D$ x* F" J% g" x& Y
if Row = -1 then -- since 70 o6 b( I2 c* @; a. R8 Q
if lan=1 then, s/ A/ U' Z& ~' g) U+ ?5 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 a4 s8 y( J. C
to_str("in der Andockstation: \"",?.~.name,"\""));& B- k0 C' n3 G# O k1 r
else
& j* ]0 N+ }8 }, W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 U! R9 v( \$ \; c( v0 d5 s8 M
to_str("in docking station: \"",?.~.name,"\"")); / v/ M% K3 U- M* u% o/ T" X7 ^
end;
5 O: V: ^% l' s3 [% v- {9 c, f else- ~) ?& h3 k* Z6 R5 [( |/ V7 E3 m
@.Destination := assignLObj[1,row];1 i* y& o' k0 ]0 v
end; ' P% S- }0 T: M" f' f- P' P# S7 V
newDirection(@);; _# V( ?0 l+ D7 A
@.HasOrder := true; k- T& C/ l( F; p8 ?2 S2 X
end;
# P% ] T# Q( y$ B9 P end;
X) w9 j- o$ c) r0 c) Qend; -- of the method
4 U5 ?, y J: o. q |