/* called by: entrance ctrl of the object 'track'
! {, l. q* G4 C; }, T*/
) X- F6 A: u9 x2 Q6 pis
5 E8 z# ^! J5 r7 j: k" B5 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;. E8 O8 m; o7 ~. S3 \
do4 J1 ^- W6 T+ Z: Z8 t% J! v# f
Lan := rootfolder.Internal.Tools.AOLlanguage;
z( X5 Z6 b' p( W if current = @.Destination -- else return9 y. N0 o) B1 ^+ ?
then
! o+ i9 a. A" `3 Y9 T- g9 y @.Destination := void;3 V" [; f0 e8 L! A; u
if @.occupied then
6 N5 g# h" {" T J part := @.cont;
, {) p% c% |: Y3 Z: j @.transpOrder := void;- K* j% Z* p. ?% O* F5 K! d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: _ ] X7 l; h6 S* E6 ^
@,root.eventcontroller.simTime);& V" t4 F$ K4 y$ H0 z1 D
@.HasOrder := false;
& Y6 Y' o1 Y$ C+ \6 c* { @.DrivingHome := true;5 U8 A+ k0 U$ i: P
rgManager.tryToStartTransOrder; f0 E" L: `" @
if @.Destination = void% u4 ]! P, D; S
then -- no transport order for vehicle @
! ~# @4 L# D6 T) R' i- Y @.Destination :=
& `. h5 H$ |. P- h- r3 x rgManager.nearestFreeStation(@,track.~);
1 e$ g% G! S- S4 A0 f newDirection(@); 5 h; B) L- ?" F
if @.Destination /= void then% b) J7 a2 N8 p V3 O
@.Destination.NumReservation :=) V9 P- m- s' k) l6 q: L9 y
@.Destination.NumReservation + 1;
3 @% \' G" U( j; m" Z5 e# n3 h' B end;
* w8 c7 p, ?/ _0 g! Z7 B5 C) T @.CurrIcon := "drivingHome";
5 |+ n$ W! W3 |6 t7 g6 f7 H' G @.DrivingHome := true;
* B/ ]- a4 q: N/ j end;
. x; b4 w Z9 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 T2 ?; }" s5 ?! Q* F
part := @.transpOrder;+ o9 z4 f j$ v( v8 o9 N
part.move(@);-- load part! [& c3 `3 l- G# ]
@.CurrIcon := "load";
0 D6 ]* v: V* f. @ GlobalDistObj := part.globDestination;
# k. a t& d W. N8 I R assignLObj := rgmanager.rgAssignL;
1 v% r; r& @7 E( ?6 s* O6 D row := assignLObj.getRowNo(GlobalDistObj);" E7 {" X5 b4 f2 P; V
if Row = -1 then -- since 70
4 i9 z/ l8 w, z$ t# Q1 M& n if lan=1 then
7 b0 N z; {# \ o5 p; H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- e; M3 |1 ^; J; s( F# p) \ to_str("in der Andockstation: \"",?.~.name,"\""));
6 |4 H3 i9 V$ s+ s- ^ else7 I" p1 q! B, t5 `: S" u% s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- `$ [; e: Q) u: r: [$ J
to_str("in docking station: \"",?.~.name,"\"")); 3 d! N" c, M: E
end;
" f. |( U! M" T- q! |, Y else( B; e- Z N- @' W7 b5 M+ T
@.Destination := assignLObj[1,row];) H& e; u( O7 Z$ q) M
end; . m. S6 k5 |2 m: F
newDirection(@);
* Z4 ?8 b1 K. G3 L. o7 K3 | @.HasOrder := true;
" u0 G) z, g% g$ z end;
. Q! k& a! ^# P) [8 Q end;
% u9 v; E/ u% F" n8 ?end; -- of the method. F+ a4 k N$ A1 [* V
|