/* called by: entrance ctrl of the object 'track'
; @1 x4 l9 O$ s- S1 {*/
; P6 y9 M0 k- q O# g% J$ o4 \is
0 l P4 P6 B- ] [6 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# U' C; X5 l1 C' i) b7 n2 cdo
) X @0 R# Q/ R' M9 G Lan := rootfolder.Internal.Tools.AOLlanguage;
# L6 \" [+ P2 }& p5 p if current = @.Destination -- else return7 G9 P8 ?* s+ P- e
then) t3 S9 W6 |5 n7 l" Z- }
@.Destination := void;: a+ }8 O2 s8 ^5 J' {! @& b: ]
if @.occupied then: t8 A/ U1 e* ?1 _
part := @.cont;
2 R- }+ |) f, i/ ~/ f* |+ @ @.transpOrder := void;
9 q" j/ j. Y2 W& ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 J5 y+ i0 r$ F& A$ Q; {
@,root.eventcontroller.simTime);
" S5 J p5 l9 B6 S( G1 X @.HasOrder := false;
3 l' b3 C* ~+ y* D" X9 F' y @.DrivingHome := true;
: a9 `" x5 }, |' e2 u rgManager.tryToStartTransOrder;
! ~ @' U L( j- R9 S$ p+ t if @.Destination = void
+ A. ]3 K! l# c. j8 u9 K0 N; R then -- no transport order for vehicle @% S+ C% Q; H2 `3 m0 d
@.Destination :=
0 t' Q9 v1 `" Q5 g rgManager.nearestFreeStation(@,track.~);
8 B$ h$ G+ X! g: C newDirection(@); - A, D6 ~" j+ C8 U
if @.Destination /= void then- L3 ^# l0 O: q9 L, e
@.Destination.NumReservation :=. {0 Z# |" O( ~8 C4 f9 M* `
@.Destination.NumReservation + 1;
8 `: Q3 r) ? n% w end;
) I7 H5 ]6 t. {2 f Z1 ] @.CurrIcon := "drivingHome";
, c+ }& g# u+ X, ?8 { S$ b @.DrivingHome := true;
3 h: ]& C7 z! j$ t1 [3 g end;
X# Z% O6 O/ x! b. E3 z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 C. E" @' {# m; |( G part := @.transpOrder;. F! n/ z" y& k" p+ q
part.move(@);-- load part
# q( K2 `8 F: P9 q3 o @.CurrIcon := "load";) N7 s/ B/ Q- g9 h' c
GlobalDistObj := part.globDestination;3 q8 R/ x2 K0 f( d6 g
assignLObj := rgmanager.rgAssignL;
( O) q4 Y$ e4 e* ^ row := assignLObj.getRowNo(GlobalDistObj);% y- U( [* ~; @& ^: i0 n
if Row = -1 then -- since 70
9 m1 c0 @2 A# g4 [ if lan=1 then* h3 v$ B% F4 n1 x/ q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D9 j+ Z- p8 O% H
to_str("in der Andockstation: \"",?.~.name,"\""));8 U( v3 H6 ^! v9 O; i6 n" I3 r
else3 A, U4 k! e$ Y: Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ^' x& b8 t3 v! z. A, o; ~2 E: I to_str("in docking station: \"",?.~.name,"\"")); $ e: U( }- _9 I6 N% ^5 W7 K
end;4 t7 s& N+ H) T8 e
else0 L& {5 y, B: |0 @% Y; c) f# @) i
@.Destination := assignLObj[1,row];
4 d5 G! ?8 o( U9 C end;
6 s7 ~! a( m/ F% _: _: c c newDirection(@);2 p0 s) r/ I1 @. O3 C; _2 m
@.HasOrder := true;
: t9 C; t6 u7 d8 J9 q end;9 c7 M* I; z) k" h" B
end;
. `. S" n4 Q3 |; hend; -- of the method
3 c: [* U9 X+ Y1 T4 J7 K |