/* called by: entrance ctrl of the object 'track'
! o9 q1 I: H' @* d* |$ X/ c*/
& T3 e: k! a: S, Y2 W0 }is
. F. v+ j+ S5 H/ A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" _2 h; {& c0 ?do# r: [" ~+ T3 @8 e/ u3 Q) o0 @/ c1 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 L4 m% q' O3 L3 e" N, k; x if current = @.Destination -- else return
i* W, j g6 }, |- Q then$ s- C2 A% _6 e+ F) O) M
@.Destination := void;5 k/ C5 P' Z( y
if @.occupied then
0 Y. f. y" P# u! `' g part := @.cont;9 N6 d" M8 ~9 K9 A* Z
@.transpOrder := void;
& Q/ G/ J4 D5 q" T* F j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 k8 T1 w/ ^2 ~! X0 s @,root.eventcontroller.simTime);5 r7 R ^9 j2 Q$ E+ B) m: E
@.HasOrder := false;6 `- b/ {8 r% _. s& S: m% x
@.DrivingHome := true;# j6 e2 d9 q! k* w. n1 t4 y6 W
rgManager.tryToStartTransOrder;, \& b$ y! Y- o5 w- F
if @.Destination = void
* i+ a% f$ w) Q then -- no transport order for vehicle @5 s* @ ~$ C" S8 D0 p
@.Destination :=1 `4 O, b7 o' ^, i8 r5 i4 _
rgManager.nearestFreeStation(@,track.~);1 V- Q, f. k6 l H. J) u. O
newDirection(@); 5 p8 [: Y: F" R- D6 N; c8 `
if @.Destination /= void then
: U% g0 Y* s7 S: Z* j9 X, P# g @.Destination.NumReservation :=
& l$ W- j7 Z8 N( A8 t @.Destination.NumReservation + 1;
( u6 v; K/ C H7 P end;
( v* ^2 \7 T! {7 J" D1 I% W @.CurrIcon := "drivingHome";
2 e' ^% h$ a4 v. U3 p4 _6 u @.DrivingHome := true;
" j* ~: t) D9 `+ F end;. d& E# U! ]$ x2 X0 k( K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 w- O4 w* B* p( o$ b0 } part := @.transpOrder;
7 o' H4 u$ F& G9 m& @2 z+ n$ Z3 g part.move(@);-- load part, {! B" e7 x' G9 n9 J/ y6 D
@.CurrIcon := "load";
: p1 R6 H/ L* P; _9 t/ R, O GlobalDistObj := part.globDestination;+ U: |. \3 K N
assignLObj := rgmanager.rgAssignL;
3 f' G: P( ^& y- S% N% c( D1 A row := assignLObj.getRowNo(GlobalDistObj);0 `* a" n' U% C4 m
if Row = -1 then -- since 70# K& F8 N: j! S+ v
if lan=1 then9 b8 P" }$ R. C$ G% ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 q6 Z6 O/ ]6 x. g/ w. d7 e
to_str("in der Andockstation: \"",?.~.name,"\""));' Y. d4 V3 F, ^9 G- J' g4 _( o
else$ \* J. m# n& a/ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 M5 ~) k, ]% F+ E6 n
to_str("in docking station: \"",?.~.name,"\"")); ) \5 U7 c' E) v K; c( i$ ]) X
end;/ O6 u. s7 C4 o1 |8 P
else
C* ]1 P: `/ R9 K3 H3 @) W) e @.Destination := assignLObj[1,row];" g6 J7 B+ U) \: N+ ?, R
end; . {* k. ~! v) Q1 z- Z: j9 l3 ^
newDirection(@);% [- g, w* o# o1 K0 Q$ o$ D# d8 z
@.HasOrder := true;5 X v" K7 V e1 l5 L0 y: b
end;# B- v% g% z$ N7 ?- V
end;
3 |4 ]- z; |5 m6 q* I7 send; -- of the method
5 r1 |7 K( t* r0 m: V2 } } |