/* called by: entrance ctrl of the object 'track'
8 @* k0 G1 a. z! u' Y# n; M/ H*/( g" f% i4 r% J
is
+ l2 A, O. x! ]0 b, O1 u3 g+ r! f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 V: [. p" G vdo
7 }; n! O4 A0 M% i% s9 T Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }0 e) w5 z' j$ ] if current = @.Destination -- else return
# |. k/ t- C$ V5 N2 R then
' }% s6 t4 m- [/ U2 g& Q, ^- e @.Destination := void;5 B/ Q* v3 l- U
if @.occupied then1 {7 _. f5 i2 l5 j" \- m
part := @.cont;
3 O; U o; m9 S& B1 d; [! l @.transpOrder := void;6 h- l. P) o' L- |& ^5 b& r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]) d/ @* l0 Q- R, ?4 Z
@,root.eventcontroller.simTime);
, o- @ F% K* l9 A( d @.HasOrder := false;& [' ]0 E3 `5 j3 w* |* t" o
@.DrivingHome := true;
/ `1 P' g4 K& {- J rgManager.tryToStartTransOrder;
0 k) `' g: n8 a" Y: s' u if @.Destination = void
# o- \+ p9 ]! H then -- no transport order for vehicle @
- t* |% c" u" I. s! |7 {3 X @.Destination :=3 i0 E% K' r" k, d& C4 S* x5 J+ R
rgManager.nearestFreeStation(@,track.~);
1 b7 h) Z6 a8 D1 M/ g newDirection(@);
' R' J' \0 c: M if @.Destination /= void then
7 G0 H5 i! J5 z* N0 O" s- F @.Destination.NumReservation :=
0 \6 t" f( P) C: V @.Destination.NumReservation + 1;
- u9 P$ C% Y- Q ^) A; d- U, Q end;
% w0 R8 {! T1 s6 y% n* P- o% ]2 A* Y8 q/ u @.CurrIcon := "drivingHome";
' g8 Q: l) x8 i6 _$ p @.DrivingHome := true;! w! h& Y/ V" C0 Q) Q0 b
end;" ~2 t4 `0 @8 g7 _- v# i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J0 s# ~. `0 F# o v
part := @.transpOrder;: c8 Z# k( @, H' \
part.move(@);-- load part
- K# l4 D5 X+ [ @.CurrIcon := "load";# I* j; O# F2 [9 W
GlobalDistObj := part.globDestination;
2 E5 t( `4 w+ H assignLObj := rgmanager.rgAssignL;/ B3 d5 W0 w! I; r
row := assignLObj.getRowNo(GlobalDistObj);
: b- J6 A* {* f6 Q3 q) F if Row = -1 then -- since 70$ G9 d) R2 G# ?/ z5 i
if lan=1 then7 p6 B( u! q& y* H$ f, n. |9 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 d- f& x4 _$ j8 L3 b% n% U$ U6 O
to_str("in der Andockstation: \"",?.~.name,"\""));3 |9 y+ `' h5 z6 H
else
& m( P4 ]: h+ T) A3 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' ^4 J' D( E0 Z( ~6 | to_str("in docking station: \"",?.~.name,"\""));
3 G5 b$ N9 m+ t7 E0 \7 Y end;( D# e- ^5 `4 P! ]5 ]0 @* O9 c3 y4 I
else C8 N, t% C5 t4 L
@.Destination := assignLObj[1,row];
% |+ B0 l( |: ^ end; 0 d/ G7 X& Y1 |( a+ o5 `, K9 }# ]; c; M
newDirection(@);3 z1 ?& O& L1 o% a
@.HasOrder := true;
1 @1 m* { ]- n* E9 L- |& A end;
- u3 ]- I, E7 d$ M% P5 p end;9 H5 d' n, t! u* ]
end; -- of the method
" Z) o6 o( T8 O) ]- w |