/* called by: entrance ctrl of the object 'track'
* e3 t5 t m) X: G A2 [% e- T2 L*/
+ c: M7 @$ i) l. q8 a& c6 Ois9 Z6 q9 q x4 g4 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: Z. M# q. N- h: N0 P
do/ }: K6 f1 A$ [3 b
Lan := rootfolder.Internal.Tools.AOLlanguage;( h! _9 v! G7 Y0 e
if current = @.Destination -- else return3 p3 d; _! _1 M1 }' [; [/ H
then
5 r$ p6 e& P. M& v @.Destination := void;! r9 e: [" c \" u( n; E
if @.occupied then
* D6 e' V2 m: O* P' G l part := @.cont;3 n! M8 g+ r1 X0 r. R H
@.transpOrder := void;
/ `7 Q% y$ O# P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 c2 ?' Q" b$ V9 }! I2 X4 P- S4 W$ P
@,root.eventcontroller.simTime);
6 o( a; \2 L1 B4 v @.HasOrder := false;
! ]3 ~: I! {5 L4 s4 l @.DrivingHome := true;
; t0 P- ?" f: Z rgManager.tryToStartTransOrder;. j8 I. \4 m' Y) O H( _. f* {% a! H
if @.Destination = void5 D0 n4 s1 o+ {8 M. N! M! Y
then -- no transport order for vehicle @
# z3 H _7 M) I+ D @.Destination :=6 a5 A/ b* Z3 U {- y' G5 j
rgManager.nearestFreeStation(@,track.~);
+ d, K E$ U. k- `9 E" v. a8 ? newDirection(@);
7 D0 r" P1 _' h0 ?1 n if @.Destination /= void then
: C) @; C, Z# Y; {- }: J/ V5 P @.Destination.NumReservation :=! X, h5 {3 ^- `- H" \ t
@.Destination.NumReservation + 1;
6 R0 {/ V0 c0 z* a( ~ end;: l3 f. @. e( q5 {
@.CurrIcon := "drivingHome";
: \* G7 |9 t" t! s @.DrivingHome := true;! Y1 b9 |8 Z0 }; s8 T6 U+ Y
end;$ J6 z/ Q& M4 A* T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c, ]+ Z/ ]+ i) Q$ ?& m# [6 ~9 _# \
part := @.transpOrder;
+ {! }' C% ~7 w- M v part.move(@);-- load part6 a# W' U. m5 z% ]$ |
@.CurrIcon := "load";: i l! t2 d/ Q9 j
GlobalDistObj := part.globDestination;. P* J. i. I3 a8 Q, f0 |& g
assignLObj := rgmanager.rgAssignL;
( Z# b' A1 y' o row := assignLObj.getRowNo(GlobalDistObj);1 t- p; g6 \0 z. i( h+ p
if Row = -1 then -- since 70
4 ?: {% M* |$ p8 C6 u if lan=1 then7 I4 F' ~: [8 J0 Z: \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G( e& g2 L+ P% { to_str("in der Andockstation: \"",?.~.name,"\""));9 K. c! ]% }& M
else. z2 _, g4 I+ i( B7 f6 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' E5 i0 e! }- y. @( G/ n3 T+ w to_str("in docking station: \"",?.~.name,"\""));
+ C& k$ \. f. R5 q* Y& _ end;
: J! ]. X, `) l! p7 X( L! Z, s else& Z& c9 o, Z, [' d
@.Destination := assignLObj[1,row];, T/ f/ i; J9 F2 o9 Y
end;
- i1 i" a6 U4 r7 c! w newDirection(@);+ q0 e' {, P2 [* k3 }( b
@.HasOrder := true;
( Y" h- `2 A% H# _' H) Z# m, c# m' R end;- q( A7 `# I: `. Y5 o
end;' v; u$ P( T/ F+ L) M4 T
end; -- of the method: ]$ O( y6 }. _7 b
|