/* called by: entrance ctrl of the object 'track'
x' p3 \; L/ Q1 S; A4 Z. W*/& S6 O0 D4 E" F
is
# K3 B# {3 n; i/ J v1 {9 l" y part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ p- X9 x0 S( F p
do
2 z6 n0 {! e1 }7 K6 ^, s" Q$ |) v3 \2 J& o Lan := rootfolder.Internal.Tools.AOLlanguage;/ P' x6 T: F* c# g. j
if current = @.Destination -- else return
2 ] T4 T9 j8 W0 G then1 G$ n3 n( l- C5 O2 M5 j+ w! j
@.Destination := void;# v' L( n5 Y- C) t+ P
if @.occupied then! C" T& x$ R1 |7 t
part := @.cont;5 w; Y) ? E0 j* j* R
@.transpOrder := void;" o# o2 I' W7 d+ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 @8 I9 i( N' O( f) V, m
@,root.eventcontroller.simTime);4 \* u; B$ k/ }* l0 n! L( t
@.HasOrder := false;
& b/ Z0 T J d; m @.DrivingHome := true;% w/ M+ Z$ m( \/ j
rgManager.tryToStartTransOrder;& f, [6 f! C$ ]2 [7 m4 Z
if @.Destination = void1 o C+ r# h+ d6 p1 W
then -- no transport order for vehicle @
9 y4 I; H& |6 ~/ ? @.Destination :=& _8 c [/ Y2 S8 m F
rgManager.nearestFreeStation(@,track.~);0 K8 s$ h: o) ?: o1 W4 R
newDirection(@); - W! |! U" n3 q3 U5 W3 \- x
if @.Destination /= void then8 }+ Z. E2 v2 ~. h" X9 y5 K
@.Destination.NumReservation :=
2 f' _, U$ d/ Q4 h( T5 p4 p( s @.Destination.NumReservation + 1;! I2 d$ M7 L! M2 D! I' s
end;
4 ]) k; z- Y+ J% [* B% D' C @.CurrIcon := "drivingHome";
2 j9 b+ q" F* M1 o7 X, Z! L @.DrivingHome := true;
" T5 i. P5 R. l, y end;
, j0 f- E! [8 U& p$ Q; q8 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station# J( i2 V: [/ D# L [6 V. E
part := @.transpOrder;, `6 ~% v& b7 f* p8 i
part.move(@);-- load part
! d; K K$ V* Z. @4 q7 X: _ @.CurrIcon := "load";0 F& Y$ J8 Q( K# k7 N) ?. \) h
GlobalDistObj := part.globDestination;' k1 F& f6 T$ C( W
assignLObj := rgmanager.rgAssignL;
6 _" O& `7 }: u6 c! d row := assignLObj.getRowNo(GlobalDistObj);
) m9 }/ P8 `( y6 k$ O5 w2 Y6 t6 A if Row = -1 then -- since 70
" i% V5 [! ?% O! \ if lan=1 then
0 F0 |4 f0 m8 C! l- C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( n' i8 _0 U3 q# H to_str("in der Andockstation: \"",?.~.name,"\""));
9 O; y9 D' |" [9 T ` else
8 x& T0 b5 a* O8 ] W3 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 O4 V- d9 U: D8 n
to_str("in docking station: \"",?.~.name,"\"")); % `8 O2 j z2 m9 i3 c8 N- E0 l, b
end;! ]0 o8 M2 k- g, u- }% L/ X: I1 _
else
0 |: B7 w2 p* K# U2 g" ^ @.Destination := assignLObj[1,row];
: |5 A' {/ Z2 g9 k; S: k end;
3 L& i5 `- Q; o4 P; x newDirection(@);7 i; k j+ V6 y* J- o
@.HasOrder := true;
! z, R- ^, P- N6 A& K$ X end;
7 B9 E! v1 b: Z1 X& ? end;9 H; `- C! K1 ], P( d6 M
end; -- of the method
9 X' ~+ `4 H- L+ z7 j9 i Z, G |