/* called by: entrance ctrl of the object 'track'- H& u4 |6 j$ C
*/2 Q! B. `- G; _1 c% l; ?
is
9 P9 e V% i8 y7 a' i6 C2 \3 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! T4 i P; O% Z9 `5 L( D$ Mdo5 a- s9 O" R" @
Lan := rootfolder.Internal.Tools.AOLlanguage;
; y- z* d. X' M; r% E if current = @.Destination -- else return
% c4 c/ H1 o4 x/ S! E+ ~4 a then- r+ a: j( P q4 J
@.Destination := void;6 F2 A* X3 L J2 _+ q
if @.occupied then7 p: c# Z2 v7 ?7 @" R) t1 A
part := @.cont;$ a( A) w# M% e0 L' S8 S
@.transpOrder := void;
) l5 c9 e$ k8 C4 n" W1 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& [3 w4 N; q l9 x8 |1 ]
@,root.eventcontroller.simTime);, J+ K% f, w8 q3 ?7 ~
@.HasOrder := false;
' Z! t: Q1 [- Q) ^0 o+ u+ ` @.DrivingHome := true;4 a4 Q1 z" D- ]& l$ q
rgManager.tryToStartTransOrder;/ A# |0 R7 u. l& B8 j; t c
if @.Destination = void; e3 U7 p. u$ H# a( w
then -- no transport order for vehicle @4 C; `9 n b }- H
@.Destination :=% g) u2 u5 t: h6 z; W6 I
rgManager.nearestFreeStation(@,track.~);3 K; O8 o: P4 b$ _
newDirection(@);
8 @7 {# E' X" n$ Y if @.Destination /= void then
# D; L$ v; p4 B0 j6 I) D @.Destination.NumReservation :=
, h: K+ G5 t0 e& i @.Destination.NumReservation + 1;- V# K+ B7 R# A# c
end;% o7 B, l4 X6 E' R5 N& b( R
@.CurrIcon := "drivingHome";
7 @. ^0 h: p5 k7 Z) F4 q% v @.DrivingHome := true;/ i) M. I5 w( ~- S# |1 e5 a
end;, @5 u& N6 @* S0 ^" d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ~3 W4 B+ w+ k9 ]4 W) `0 t/ e
part := @.transpOrder;
/ G1 }6 } x1 p& Y' q/ Q part.move(@);-- load part3 N1 l: U4 q* F; A- `+ c. Y
@.CurrIcon := "load";
# l5 ?* \3 F, F GlobalDistObj := part.globDestination;
# G* M" ?) C6 C: M8 P) B7 o; F4 d% r assignLObj := rgmanager.rgAssignL;3 q1 M. v( }+ m. ^& C
row := assignLObj.getRowNo(GlobalDistObj);' Q' `7 x# B& |7 w" C8 c
if Row = -1 then -- since 70
* r" [6 a* a! p! @1 m if lan=1 then+ ?0 K$ {' e1 ]0 y" v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: [. Y3 _, @; X1 i+ q to_str("in der Andockstation: \"",?.~.name,"\""));! `; `% N# e L+ e; p
else
" W! P) w9 j6 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 V& A: T2 _2 B- F+ m7 w" f& | to_str("in docking station: \"",?.~.name,"\""));
" }& a' a5 E3 d end;" Q& U9 {9 T% d( S. i9 n
else
4 T$ m2 a3 h9 [- u; o2 ^4 r @.Destination := assignLObj[1,row];3 {9 y: x2 q2 E& \" O; N. \# p
end;
2 {- ?; }; k5 k0 O) U/ H" c2 ~ newDirection(@);
5 f0 W2 _1 R0 C3 m @.HasOrder := true;9 J# S c' F% Y m, ]
end;7 V1 X; Q* V) d* Y+ X
end;
8 {* q$ ^( v6 Q/ G( Qend; -- of the method
+ x. J4 A2 h3 K0 g* n9 `( P e |