/* called by: entrance ctrl of the object 'track'3 j; U2 o8 @% C( ]9 T" l8 M" o4 u
*/1 M. p3 d5 M$ E/ l% J
is u' q; h+ P4 G/ p, y; _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" J3 {& l4 {3 P3 g
do$ e- h6 U! h3 E
Lan := rootfolder.Internal.Tools.AOLlanguage;
% s3 k; @/ L! w5 ^: N5 e, P( Z if current = @.Destination -- else return
7 ?+ l/ z9 M: A0 l3 j then8 w7 }! ~" s/ [% f! T8 ^% K
@.Destination := void;
6 `, ?, s- c5 i- R H if @.occupied then4 H+ o4 @6 ?+ b) ] [0 j& x( ~2 c
part := @.cont;% L; {' _/ G- L6 l3 A1 `( d- L
@.transpOrder := void;2 o1 h8 n- _, q- N {* |5 b8 k3 }* W% z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( y" e/ ~2 F+ V) o
@,root.eventcontroller.simTime);8 A* {* v" X2 w2 w& a# w
@.HasOrder := false;/ N) p# W3 m& z( x$ c
@.DrivingHome := true;2 w* u. q7 s$ u8 w- g
rgManager.tryToStartTransOrder;. o' R. g; W0 {, `( Y/ B! s: c' a
if @.Destination = void
9 _+ I, i6 m1 Z0 o1 U1 `3 z then -- no transport order for vehicle @9 d: d6 v8 F. O8 `$ O4 c0 l
@.Destination :=9 _* L: G* p5 P1 d( H( W
rgManager.nearestFreeStation(@,track.~);) c, G* P; `+ M7 ~0 Y' h9 M
newDirection(@);
! `* j& E' u8 ^* H if @.Destination /= void then
$ _* z/ W; |4 W) V: F l @.Destination.NumReservation :=
/ R P' i% V. }5 f @.Destination.NumReservation + 1;
" A" ]9 e3 l2 S& \2 f( M6 S8 L% h end;3 y- b# \; l) u$ m
@.CurrIcon := "drivingHome";$ Y; K& S% W) M5 g, Y9 g, P! F% Z
@.DrivingHome := true;
* Q5 w8 I( E e; `- ~% d; S. h end;
" @/ U9 k9 F. `+ S7 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; k, M a, \ R$ I+ _ part := @.transpOrder;4 Y" h- h8 d* Y, ~3 k+ [: }
part.move(@);-- load part. S8 j, \+ v' S }: t% ]
@.CurrIcon := "load";0 }; R. L& ^* G( b' P7 ]
GlobalDistObj := part.globDestination;/ t2 M; G% @9 s0 @7 y) C$ C5 }7 o
assignLObj := rgmanager.rgAssignL;
1 s' n6 Q# G2 L row := assignLObj.getRowNo(GlobalDistObj);, c& j& T6 M1 [
if Row = -1 then -- since 70% x3 W# H* N6 Y6 @
if lan=1 then
% E( ^, S' ^2 T. @0 y: v0 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 L0 v5 x4 o S# P to_str("in der Andockstation: \"",?.~.name,"\""));
, [% E7 x: [$ r2 G3 c4 F1 M1 J( _# ~+ b else! ]. K$ x: }- r2 `" z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 w" [5 C% e9 J: G5 K! b
to_str("in docking station: \"",?.~.name,"\"")); 3 [1 p7 V' Y, T8 I' z5 A7 O& L
end;
% P7 Z# D1 r& I0 @, x else
/ K& R8 N D+ Z; M2 T8 `! v) ~ @.Destination := assignLObj[1,row];- U+ T5 D* V+ b9 d
end;
) K: o( p/ Q$ z newDirection(@);
4 a- z& d; |8 `9 k$ G( C: ^7 \ @.HasOrder := true;
4 o) j& x/ I& O0 Y1 {9 {1 y& o* c end;. H/ V f0 O, N h. ^7 k9 ~+ K
end;2 H* C2 S; U7 R
end; -- of the method
* C4 S: a {6 d! E. l, {$ X D |