/* called by: entrance ctrl of the object 'track'+ q2 T8 }! \) f, w2 S- W
*/4 s4 ]7 Z5 \; K# G2 O! B
is/ I3 O6 n' |# g. D' M" H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ @; A; u2 L( y" q# ? m5 d7 [
do5 k% N' n. ~) g
Lan := rootfolder.Internal.Tools.AOLlanguage;+ Y) b* I- [, ^4 ^8 J
if current = @.Destination -- else return) W6 ~# I; m- {
then$ G( g6 \+ F5 O3 `1 n3 z$ y6 Z/ z
@.Destination := void;8 Z0 f- D- l; `
if @.occupied then( {, r! w9 h7 a" J
part := @.cont;
3 I" L6 ?6 W3 G9 q6 r7 C @.transpOrder := void;
N8 a- i( k0 \, B6 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Y. z$ v2 }3 s0 m
@,root.eventcontroller.simTime);
' K) q3 M( w- ?- Q+ O: K; u5 e, y @.HasOrder := false;
4 g7 Q( V5 Y7 e7 K/ i# e! ] @.DrivingHome := true;
- r7 D5 B ^+ Z- s5 D7 q rgManager.tryToStartTransOrder;/ g. i# @3 ?+ N
if @.Destination = void
; m- Z1 A7 w. \# G0 \, B then -- no transport order for vehicle @
$ r5 v4 K5 c& s @.Destination :=
+ Q+ V5 ] d, D$ j: D5 w rgManager.nearestFreeStation(@,track.~);6 ~" M3 j2 U( Z! y( B
newDirection(@); % v0 A$ m: O- O
if @.Destination /= void then
# e5 m( Y, l1 | @.Destination.NumReservation :=# `3 Q# \* ?& T5 j ?% D
@.Destination.NumReservation + 1;
( J' K7 B; |- | end;9 V2 X0 P# P! ^
@.CurrIcon := "drivingHome";- L7 P. z% z `$ f
@.DrivingHome := true;
- Y# j$ `) }2 m) ] end;
/ u% [+ S3 n1 \4 g) e/ u7 t. t5 S" B else -- the vehicle @ is empty, both vehicle and part are in the same dock station: D$ C( J' s5 v. |9 w+ r/ w, A
part := @.transpOrder;. J t' e0 @; N4 s% N
part.move(@);-- load part
; z- x: D9 H3 B! Z9 { @.CurrIcon := "load";
6 Q8 u8 a. k# W& k% _! p1 ?/ C GlobalDistObj := part.globDestination;
" v; G4 |/ c# s assignLObj := rgmanager.rgAssignL;: n2 a% n3 ^* o
row := assignLObj.getRowNo(GlobalDistObj);
# \4 p( \5 z- K if Row = -1 then -- since 70) M1 F; u1 a8 s' ]
if lan=1 then
6 M3 j3 m+ `: n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ y9 O" g4 w- r+ J. I ?2 T/ Q7 P3 H to_str("in der Andockstation: \"",?.~.name,"\""));
6 x7 O7 Q9 T; S! x; `. Y$ I; a else) G+ B$ W+ a! |8 {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ~9 I3 p4 U% x to_str("in docking station: \"",?.~.name,"\"")); 1 I. K- I1 j( `7 l
end;1 b: k, ~* _4 x. W
else% o; X3 n B) f5 W
@.Destination := assignLObj[1,row];: x! F( X b6 ]' A5 @6 c
end;
7 h0 |, E7 C$ x% e. v8 M7 v% r, P; f newDirection(@);5 \7 `6 W/ S+ t$ i' `
@.HasOrder := true;
8 V `% `* J4 s) V- T' P4 ^( F end;
+ n& f r+ m, `9 { end;
/ ^" j$ g# [/ I9 @end; -- of the method
2 B$ T* A( s0 N& s& G: y4 U6 o" v |