/* called by: entrance ctrl of the object 'track'
7 |! j5 f3 K* d) j6 V3 @3 T/ }*/
8 `- k: P) k: ~, Y Yis
) K1 r* w( X% J. v. Q2 s8 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;& {: ] r; _; `/ d3 V/ H
do, H/ F9 `: R0 o+ u% j
Lan := rootfolder.Internal.Tools.AOLlanguage;5 w1 \7 s6 E% y1 ~
if current = @.Destination -- else return1 d+ F8 ^2 G) v) _. i
then
+ i5 a0 w& @+ q! v. B0 m$ M" ] @.Destination := void;# y4 q# G+ H* n! t4 q2 P
if @.occupied then' P2 g. |6 }* c1 u+ @: y G$ [
part := @.cont;
+ r S t, w: X; t$ D0 A; h* y @.transpOrder := void;
9 n5 r: [' P3 ^* ^- \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* F* F' L7 K% p" e, r% S7 O" D
@,root.eventcontroller.simTime);: i# d2 L- ^3 w" p
@.HasOrder := false;
, h: o S' t7 l2 F @.DrivingHome := true;
: R1 h+ F/ t1 r rgManager.tryToStartTransOrder;
& `, c/ Z& n# U) d7 J/ w( ~ if @.Destination = void
( G" K+ c: d& `3 n then -- no transport order for vehicle @
# {, e5 @6 u# g2 z2 ^ @.Destination :=! C2 t5 T2 j( K6 e& J/ k' W
rgManager.nearestFreeStation(@,track.~);4 X/ D; ?+ \, ~1 U9 K
newDirection(@);
* g/ J0 A( O+ q" M) N* c if @.Destination /= void then
( d. e& b% i1 e' [$ w7 p6 ] @.Destination.NumReservation :=# r; ~3 O8 F/ W9 F! J& k6 V
@.Destination.NumReservation + 1;
" a- O0 R( W( }& V* j end;
, |% ^3 T" {+ F3 V! x @.CurrIcon := "drivingHome";2 ?/ g9 J9 y8 M$ F
@.DrivingHome := true;7 ^; E& P/ ^4 X; Q% n* b6 u
end;
2 {0 r" Y$ Q* ^( G! { else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 U8 K4 Y* b) H) M. N
part := @.transpOrder;3 `$ ]: A: E9 e% A5 J5 C4 ?+ n
part.move(@);-- load part
! ]& o4 o+ S! q j* d$ x @.CurrIcon := "load";
' c. R% ^6 h; K1 l6 M. X& b GlobalDistObj := part.globDestination;
7 L% I% W3 J: z4 o assignLObj := rgmanager.rgAssignL;
: d5 R8 _/ M* G6 X row := assignLObj.getRowNo(GlobalDistObj);- S8 k9 y: N4 G+ S U7 g
if Row = -1 then -- since 70
2 h8 _& b+ F2 [/ [" S if lan=1 then( L1 E& W) ^ W1 r$ ]. E# `' d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# L& Z4 T' G! a: H
to_str("in der Andockstation: \"",?.~.name,"\""));
* G5 o1 {' | R8 S9 g% _5 W else7 n& D$ D' q: x) m2 E8 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 Z6 d( @5 m5 {* d E
to_str("in docking station: \"",?.~.name,"\""));
3 p: F; k O9 `' j L. S/ k end;
1 V- C- T% l( e4 U4 ~) r else
# s% ~, b5 P: C& n% g$ p( W& o @.Destination := assignLObj[1,row];
5 r5 j9 W6 s K2 f end; * H& T0 r5 H- W
newDirection(@);
4 s0 O. U+ [/ c @.HasOrder := true;
: G0 r# O& E/ J6 p. x4 M0 o end;
: I8 f9 o _7 _7 _3 P. x) W& R6 d end;5 O% T' ^+ ~% g- e6 n% o" V9 f N
end; -- of the method) d. \6 W; P1 c6 D+ q+ b8 K$ p
|