/* called by: entrance ctrl of the object 'track'8 H; W8 w2 q" f& ^' p8 o. Y
*/, G8 m$ p q% D: a$ K5 e6 k7 r
is8 Q6 N9 {* |( e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- v1 v: [, h, }1 \5 S5 ]6 Ndo
4 O( V0 d& V+ C" e% S, a, r Lan := rootfolder.Internal.Tools.AOLlanguage; _ i; p# |3 _0 H) [* P
if current = @.Destination -- else return
) r4 }+ f7 ]8 E. s then, K- N2 Q9 d m- C4 G
@.Destination := void;
% `- _; j8 O: |5 e" i; q- {* p% b$ U if @.occupied then
T9 m* y1 a( T( g3 s8 j3 f part := @.cont;
" O: u* ?% a& u9 B/ B$ d @.transpOrder := void;/ z' m9 t: i) E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 Z- |; n8 X% d" a1 z: ^$ I1 e! f
@,root.eventcontroller.simTime);
1 _- f9 d3 C: n( |4 h+ w @.HasOrder := false;
! A: \' H/ r% q" f$ f6 g @.DrivingHome := true;/ C/ w/ [7 N' a7 u/ y# g, e
rgManager.tryToStartTransOrder;
) f+ x' G& v+ ?/ ]3 T0 D1 J; G/ T if @.Destination = void
! E, y2 k0 ^4 { then -- no transport order for vehicle @
! D6 m% r2 {( R# K @.Destination :=
$ m( R' S, @( Z4 `" H' q1 F rgManager.nearestFreeStation(@,track.~);8 @2 l+ U. j: C
newDirection(@);
P. @1 u0 H; R4 U( _! G. Z; z if @.Destination /= void then
5 W- L( N4 }! k( w9 _5 G6 V. G2 m2 x @.Destination.NumReservation :=
6 b% X6 h+ Q K# I/ C$ Q @.Destination.NumReservation + 1;
$ T2 h& T# V" t7 k5 v0 v6 _, |4 ] end;5 |% P# @! i N4 ?
@.CurrIcon := "drivingHome";
, @% g' T. C. f2 i$ X! f @.DrivingHome := true;
, B* y; e1 N0 q. _% T* L end;
/ Y% I2 N ~- c- U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 N" ~1 S! D2 N3 G3 f+ h: L part := @.transpOrder;
( U8 ^3 K, e- l part.move(@);-- load part
# t7 g2 o; I8 @4 }, Q5 x @.CurrIcon := "load";
- v0 j! n2 P7 O; e- C% P GlobalDistObj := part.globDestination;; E+ J6 _6 b' S, a
assignLObj := rgmanager.rgAssignL;
3 S. w' W0 L* R row := assignLObj.getRowNo(GlobalDistObj);& m6 I& I2 e# z/ a, u5 E4 g. d
if Row = -1 then -- since 706 G7 H8 b/ b% {) j0 p
if lan=1 then
! c0 k% H; ~) ~/ p# q) x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 ]8 N4 Y; \) c6 R7 l7 D
to_str("in der Andockstation: \"",?.~.name,"\""));
! Z8 q+ Y! [" m8 P! O/ `# J9 K) p else
/ [3 P7 w8 {1 X3 c& Y, w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* f) I' I9 w$ ?6 p( T; a to_str("in docking station: \"",?.~.name,"\"")); 3 ]+ a3 r5 p. |( c
end;
2 b; X) J2 G9 w9 E0 ] else, z3 x+ j; { B# O) |8 N% R6 c
@.Destination := assignLObj[1,row];
9 ?8 [2 U9 {* I% L end;
9 P5 M9 g. \5 }2 Q/ X. W0 } newDirection(@);
# o! ~& a' F5 `# J' U @.HasOrder := true;
* Z/ v; R w3 J( S. m, l. x end;
$ W- }. g" U# T. |5 c: K6 w end;. E# V; @% Y9 Y; g" L. ?+ p
end; -- of the method
' w) v$ b5 A! _) ^ |