/* called by: entrance ctrl of the object 'track'$ z! z" b W- G/ J) l
*/- S$ q0 y$ O" e0 g2 l1 p
is6 Y e, S4 z- R+ t: ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 }$ G5 O: v/ [% k5 ^" R/ Fdo5 N/ d$ j, p4 U; h! ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 e6 N5 B) `4 U if current = @.Destination -- else return7 p5 z( ^! |- G
then& a3 V# i& W9 v
@.Destination := void;; Q, ]6 M5 c9 Y0 K8 S0 R
if @.occupied then# g/ N, t2 T5 ^& I
part := @.cont;
" Y& p$ [1 H+ g) s8 ^5 \ @.transpOrder := void;
Q& W5 C% l3 W( o& Z" ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* l' L L7 p8 o8 T; i @,root.eventcontroller.simTime);
; c* `3 o, |# n ~ @.HasOrder := false;& O4 _* r) S9 ], I
@.DrivingHome := true;
4 m( X; _7 _0 z- v9 ?1 @2 }& C1 ] rgManager.tryToStartTransOrder;' l3 r. b. [2 z/ c
if @.Destination = void$ K- `9 u: l( ~/ ^0 q7 U7 [
then -- no transport order for vehicle @+ q' i6 L0 ^+ J& `2 u" K
@.Destination :=6 w! w+ d, Q) G1 v# F" I! q0 o
rgManager.nearestFreeStation(@,track.~);. R* f+ A0 t5 u5 S
newDirection(@); 1 i8 ?7 }, p; S2 M) G; d
if @.Destination /= void then1 G4 I8 z7 a4 S( K+ p
@.Destination.NumReservation :=9 G8 P$ J1 P% g% Z- ~4 w9 B
@.Destination.NumReservation + 1;
& e1 I1 j+ i1 i( B end;
' L, E/ _! a9 T; q8 S @.CurrIcon := "drivingHome";/ i* w h5 d2 Y+ Y6 ?
@.DrivingHome := true;
! w6 l% x' g0 c& ?% M. } end;7 I. a W- \3 Z8 K' P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Z# I( w) D" W( G; k3 k' j$ i part := @.transpOrder;. l* w1 t; Y5 x6 {2 ?1 j" o
part.move(@);-- load part
4 H4 H% K m' k4 C- J% f @.CurrIcon := "load";
; R6 D1 E( a: R- C GlobalDistObj := part.globDestination;: H& X3 D g3 y8 Y1 {' p, U% B
assignLObj := rgmanager.rgAssignL;
u7 ?2 m& V) e& c4 d' Q row := assignLObj.getRowNo(GlobalDistObj);4 f1 U+ p" i; F' A* m; Q
if Row = -1 then -- since 70( b3 C* K2 M( s6 z) o
if lan=1 then& h) ^ F4 k5 g7 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! u& r, J) ? U, y0 a# j
to_str("in der Andockstation: \"",?.~.name,"\""));
& F% ?3 l9 v1 Y" Y" n else
+ Z7 V0 M b: E& n, B* N) P4 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 m* k; ~; C' \7 ?' O o9 q" x
to_str("in docking station: \"",?.~.name,"\""));
& f ?' j4 R' b8 g0 J end;4 G" y/ o. h8 [. I+ g! u8 S( R; d
else
) L4 w* W5 G* m" M3 N/ B+ K @.Destination := assignLObj[1,row];, I9 B$ |+ M3 r# Z: ?) M9 g2 x: t) a
end;
3 \. Q# ~, o7 M. G' a newDirection(@);
& C9 n* x! e' } @.HasOrder := true;
* P' R; k# T* \6 Q! {7 ~9 r" ?& l7 f end;5 V/ \, l3 ?+ _* M' D/ s8 {1 Y3 l
end;, G8 @3 Y8 y3 x# t9 t
end; -- of the method
; Z" E7 m" b8 ^! ^# d# l |