/* called by: entrance ctrl of the object 'track'
8 F2 N4 z; ~6 N1 c*/
2 f$ P9 y/ A& \9 [0 q7 gis
4 I7 ~- m! M6 m1 l/ A# y part, GlobalDistObj, assignLObj:object;row,Lan:integer;' W' a3 U8 R' k! B+ h9 I
do$ t" N$ B# y4 h' B" [2 z6 j" U
Lan := rootfolder.Internal.Tools.AOLlanguage;) K# {* v) z( V7 k
if current = @.Destination -- else return
) c5 D; E) n# i% u then, L2 {, I. \+ I9 S
@.Destination := void;
6 l' V+ ?: h) e+ e if @.occupied then. y+ t( Q# K3 b- R/ f& ?
part := @.cont;
% R* u) s6 f' c$ q* j( [ @.transpOrder := void;
2 h3 y2 `/ p. N4 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" G% v5 S8 m5 k* G$ R: W @,root.eventcontroller.simTime);- J! s# G9 e7 o9 Q
@.HasOrder := false;
% J+ \. z* s, u8 E- \" C @.DrivingHome := true;
! T' Z# g( h5 O- ?5 K rgManager.tryToStartTransOrder;
& H1 u2 Q3 M9 k! ~( _% k. B if @.Destination = void( \% s r4 V3 T: T$ l ^
then -- no transport order for vehicle @
* [% E6 G4 j( t @.Destination :=
* B5 x' _$ ?# r: k0 L rgManager.nearestFreeStation(@,track.~);/ s8 w7 k* U, p, K" l) I* i2 W
newDirection(@); 0 N. n3 ]' ^9 y: z2 a, ^/ C- l& v0 D
if @.Destination /= void then
3 T, I- \# v) d' o# n/ ]5 ] @.Destination.NumReservation :=
& x7 f v" g8 K9 I4 @ @.Destination.NumReservation + 1;- s' M8 j8 o2 x, ^
end;% Y+ j7 Q) L; o. \
@.CurrIcon := "drivingHome";
* v, H! q1 Y' |) m1 i, } @.DrivingHome := true;
' ^) V) {0 Y; `2 \4 a0 l end;, g$ r9 l, r2 \. D3 a# U, P1 P7 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ ~7 W u( D+ D( B8 l. U part := @.transpOrder;
0 K2 ]3 k* |' j' V" q part.move(@);-- load part, J( P7 H0 i- g( K' Z
@.CurrIcon := "load";
) u$ V9 y9 P7 ?8 P* l) ] GlobalDistObj := part.globDestination;: i9 @3 T: g$ h4 i
assignLObj := rgmanager.rgAssignL;
' P0 D" |. w0 Q/ V$ I2 U- j: H row := assignLObj.getRowNo(GlobalDistObj);" j' M9 M) K- V% d! v d
if Row = -1 then -- since 70
8 [6 P" }% c& F; J; ^5 X$ ^+ m if lan=1 then
* t8 ^" i5 z1 w" i1 n7 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 V& E% Q- m A9 [) ~. e) K
to_str("in der Andockstation: \"",?.~.name,"\""));5 Z3 w4 h4 A) s( P* ?
else3 b q8 _6 k6 x. K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ y4 x, m7 {3 X/ ]7 n
to_str("in docking station: \"",?.~.name,"\""));
1 v2 q/ [4 p- x! J+ p( z end;
7 \& l' }! S" [9 y else$ J a/ l2 _! H0 W' ^' s5 Z v* p' M! Q
@.Destination := assignLObj[1,row];
$ I" `: U# }( A* J; ~ end; ! u8 Z# J* i: z
newDirection(@);& H3 |% K/ t' C5 V) L4 x/ A8 m
@.HasOrder := true;" c' Z0 [) m$ e# c
end;
& t8 V+ a7 Q3 ~% V& w c2 Z end;1 q% |" A! t$ s3 N- L
end; -- of the method
" S( D& A0 {9 n& i6 s |