/* called by: entrance ctrl of the object 'track'
$ `3 y" t8 V, c; k- D*/ q6 {- R9 Y4 G2 o
is
9 s* \2 h: n/ E: c part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 D8 c# O5 b8 c; c
do8 y1 I- \( `5 t1 A, `5 G2 f+ j* p3 \
Lan := rootfolder.Internal.Tools.AOLlanguage;9 P. l' n( D* [) i2 s) }7 r
if current = @.Destination -- else return, _0 c* p5 ]$ G# w+ s5 b; v6 |
then
+ Z& }7 e* x2 j2 x# Q B! K @.Destination := void;
4 L0 j- U0 t @0 w, i$ n2 q6 I0 f if @.occupied then
* F: J+ o3 m3 M/ I% s( O* M part := @.cont;
1 A# j( a4 w3 t. \" K @.transpOrder := void;4 g2 k6 A% K! U% c- D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ [. G9 C; E5 \
@,root.eventcontroller.simTime);7 Q0 B. C- s# M3 g& x9 A
@.HasOrder := false;* G6 c& w& K/ X( p6 D0 v' ~. W
@.DrivingHome := true;
8 h0 t8 q2 X5 i9 v$ O8 Y rgManager.tryToStartTransOrder;9 ~$ ]/ \) c$ {% M5 V+ s
if @.Destination = void
% p5 T" l+ b8 L9 X: b, Q then -- no transport order for vehicle @ l& p6 r8 i/ [
@.Destination :=
6 {+ U% A; o' h rgManager.nearestFreeStation(@,track.~);4 c% n. \# J( \6 O2 G
newDirection(@);
, s f( j% b; ^! x if @.Destination /= void then+ [8 {. M+ T1 U+ X- {% u
@.Destination.NumReservation :=
0 U" a0 M3 J6 Z I @.Destination.NumReservation + 1;4 `. f# n& r. o8 _3 n4 T6 N5 s3 h
end;7 ^7 ]* A) g6 Z8 s" H& X; t* e
@.CurrIcon := "drivingHome";
" v G- h1 ^# _$ N" F$ L2 J @.DrivingHome := true;
2 Y/ x! a0 k) s/ S& ? end;" u2 E' a3 p: k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: z. l& C6 w( D7 Z; A part := @.transpOrder;0 N3 I) x8 P: s- n% M
part.move(@);-- load part2 O- o( X; j. [ z% j" ^* D
@.CurrIcon := "load";+ ]/ C! p, Z- ?/ R9 S) N% _
GlobalDistObj := part.globDestination;
' c6 K& f! |. _ L; g; z7 L assignLObj := rgmanager.rgAssignL;7 ]5 W& n: l' [% G9 y
row := assignLObj.getRowNo(GlobalDistObj);
0 `9 s2 ]3 `, e2 c. Q6 ` if Row = -1 then -- since 70
' n0 O" b+ x8 n2 t9 p5 N# N T if lan=1 then, i" L* F8 L! V! q- q0 z9 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% A% [) o# \ F4 h B to_str("in der Andockstation: \"",?.~.name,"\""));, _8 {6 Y& q$ H
else
+ e1 f3 @) C9 o. n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& @, q% c' V/ E+ I, D to_str("in docking station: \"",?.~.name,"\""));
" _% T1 C/ q }" z+ z end;5 w, |6 b1 _" N, c+ C3 W! `
else
- p4 @9 n# w c, b& }' ^ @.Destination := assignLObj[1,row];
& F8 _2 T/ u6 t9 _' ^7 z7 W end; ( D1 T6 h% ^- r$ F
newDirection(@);/ Z2 j' w" Y: d3 l0 J+ p4 H4 W/ _
@.HasOrder := true;
! a; y0 r$ V4 d$ x, s. {9 I end;+ ~: Z) C8 i l' L7 W7 b
end;. C% z! ]1 i8 d/ ~3 I4 P
end; -- of the method* @2 {8 y; G( }/ d1 L
|