/* called by: entrance ctrl of the object 'track'& D( Q( H$ t0 V9 @4 J y# _) h
*/
6 G" y2 _9 Q; R% t; z0 Y2 Y5 |is
# ]! r0 m) ~3 w9 R) y* N8 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;# ]! ?( E9 V C$ f* W2 N
do
. }+ e, U6 i$ V( Y7 r Lan := rootfolder.Internal.Tools.AOLlanguage;- t r; f( b' w# F; q
if current = @.Destination -- else return
; [2 B3 R& r, y, D7 Y- f4 G; N1 i then6 X0 _, h+ i! [, m2 c- L
@.Destination := void;
$ Y/ q2 u Z( c7 S1 |2 @ if @.occupied then
- [% P3 u' ]: k9 f, z R part := @.cont;
: t- d9 O, y2 q. @1 I G, L @.transpOrder := void;
; e" B" A x- | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. _2 i1 _+ x! }/ T
@,root.eventcontroller.simTime);; U2 e5 S& w8 H) v( w- W
@.HasOrder := false;
! T9 E- E9 q# Q6 ]. w @.DrivingHome := true;) i9 D+ o0 N+ E2 q& b
rgManager.tryToStartTransOrder;
2 }: t3 j% u- o3 N- N, K if @.Destination = void% g* G: m7 R" [! {3 N* i
then -- no transport order for vehicle @. I: Q! \3 D' Y8 q7 _
@.Destination :=, \* P. e$ O! U$ v
rgManager.nearestFreeStation(@,track.~);$ ~3 C/ ^% V, ^, `& ]
newDirection(@);
0 W- P" L+ e( y, ]; T if @.Destination /= void then
/ L; ^) r$ ~4 X* A- p! ~ } @.Destination.NumReservation :=3 y3 Q3 p3 B. g H2 v" D' ]
@.Destination.NumReservation + 1;8 M2 f/ d# `5 ]; |, m
end;
4 m7 j* H f4 A" O# [+ G @.CurrIcon := "drivingHome";
5 N/ J& c" `8 t @.DrivingHome := true;
: j6 X1 ]# I* u0 q2 l- D end;
% x! l7 F& }5 ^. \+ S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 R* v1 D6 s$ P* @9 _ part := @.transpOrder;2 r+ o0 n7 S J3 x% g
part.move(@);-- load part) v$ s/ i% A4 g2 F
@.CurrIcon := "load";
: U# h# N. d; ^ GlobalDistObj := part.globDestination;
8 x# W- Z; K& T3 B1 o' K3 V2 V assignLObj := rgmanager.rgAssignL;
& i0 U9 `2 ]2 X/ R! ]! t2 R- [$ X row := assignLObj.getRowNo(GlobalDistObj);
p" k0 ?7 D' I: P+ ~( t if Row = -1 then -- since 70
' O- H3 n. m3 V" {; e1 P4 S( E if lan=1 then
2 r( ~6 q! z8 v' s0 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 C# m3 S2 W2 t' Q$ \0 r4 V to_str("in der Andockstation: \"",?.~.name,"\""));
/ o" z- J. V/ A6 j5 w+ w% i0 a else W8 G; I# B. |6 c& ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' q' \& {; h1 H
to_str("in docking station: \"",?.~.name,"\"")); . H5 F/ E3 r# _8 g* o
end;" A% ^7 J! [4 z
else
h w+ E1 o4 {3 y+ Q3 F1 A1 q, ] @.Destination := assignLObj[1,row];
$ @" u. J. t- V7 {8 Q& ~4 V* j end;
: n! G1 F1 f+ E0 @+ q/ S2 z+ T8 _ newDirection(@);, e7 Q2 p4 F: {5 @/ N2 F
@.HasOrder := true;
# n( o3 V& y7 ~8 X end;7 L9 x: D( ^( X3 \
end;8 r" N8 [5 C1 P6 ~) K; {. o
end; -- of the method; J) `* K- [; c( @# D9 {
|