/* called by: entrance ctrl of the object 'track'6 P' q, p( m$ }5 T( ~" y4 c9 o
*/; x9 E4 `+ \# T3 ~" e2 G# A
is; \$ x# O1 S0 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 }' o1 }8 M0 k$ d" B* ^7 z' y8 y; ^do3 r2 P: ]/ z9 _) k8 |9 H8 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
# c) [9 ?/ h0 y& P1 P" c, F if current = @.Destination -- else return
) Y' [$ o9 Z9 j2 R" ^ then$ O; [! x( X' |8 Y/ E0 H) S
@.Destination := void;! d @7 {. t& x9 d5 e4 Q) H0 J3 I* R' x
if @.occupied then, K; x: a+ k$ H
part := @.cont;* U$ ?$ p9 F: H* v( e9 Y! y4 M8 m
@.transpOrder := void;, t" V* e# A$ K5 x6 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 G3 x8 o7 w3 Y @,root.eventcontroller.simTime);
& }+ J8 F$ B N @.HasOrder := false;' V# f5 d! X% C4 g
@.DrivingHome := true;
5 q. U m/ J. ~4 p rgManager.tryToStartTransOrder;
4 h5 q/ W+ m8 F! l! A/ Y7 z' k; A+ f if @.Destination = void
9 U' p+ P; y* L then -- no transport order for vehicle @, s5 }% j1 `; X9 A1 z# Q/ f0 K
@.Destination :=
% m% r6 d. l, f5 Y7 Y! M1 N rgManager.nearestFreeStation(@,track.~);* h: a) Q1 s" e: z* J& K. |
newDirection(@); $ \" Y9 C) Q# g! y
if @.Destination /= void then+ E) q* Y. o# G
@.Destination.NumReservation :=, L( o3 `5 U1 y, Y2 B% u f) s R. {! }
@.Destination.NumReservation + 1;4 o& ]$ u+ p% x9 Q( U" P+ @/ G
end;
1 p: ^, B" q7 l4 u @.CurrIcon := "drivingHome";, K5 V" a% g6 A- T1 m) @. _+ r% z* Y
@.DrivingHome := true;
. N* T, ^' H+ G; d. Q+ Z; {8 L end;0 q( a6 `5 N& @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 k/ {, D* k* l! I# b( j
part := @.transpOrder;
4 H( X6 G6 `' U( X0 ? part.move(@);-- load part/ o/ O; u7 c. z+ T. D6 p
@.CurrIcon := "load";% @: r& U) `2 P- d, b( M
GlobalDistObj := part.globDestination;* f5 z6 i+ u: M5 T' c4 F7 |
assignLObj := rgmanager.rgAssignL;+ d5 X& _: |2 }- \4 X
row := assignLObj.getRowNo(GlobalDistObj);
, ~5 d" t8 V+ Y+ z7 {) \ if Row = -1 then -- since 70
8 n- l7 ]' G: [5 B if lan=1 then0 c$ z" `4 t! i+ |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 v2 e8 e8 Z% A
to_str("in der Andockstation: \"",?.~.name,"\""));. v: ^; ] M: v [0 D: Y
else
+ V a- X, r( D/ x7 C7 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 ?# ^- e q4 E9 L
to_str("in docking station: \"",?.~.name,"\""));
* R( k1 A, J+ O end;" q3 g, I" E$ m! y
else6 y( ^/ s6 X5 _& W2 O, t
@.Destination := assignLObj[1,row];
' G( r5 w3 ?/ j/ V( L% n end; , a- z' y7 Q9 I5 F% M( S- `
newDirection(@);3 Q: E$ o) }: }5 u0 z- T
@.HasOrder := true;" u( ], p6 C8 d) Y, n
end;
6 w0 J4 ]. P& G: |7 v" _' z- | e9 C0 P end;0 R/ p! l; c. O" }4 u
end; -- of the method
. t$ p* N5 [# u. [+ k d% ^$ s$ c |