/* called by: entrance ctrl of the object 'track'" Q- h0 J5 I' H6 o) [! l4 E8 A! E
*/
) n' q8 J' d' K% } z3 Ais
2 T+ y% {7 q6 c: N/ X/ w2 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;& B( E/ G3 }( F% Q p6 L
do
" e. f: U# }0 v Lan := rootfolder.Internal.Tools.AOLlanguage;
/ `7 D* g) z' y if current = @.Destination -- else return) l3 v( B1 J# j5 X( i7 n6 _$ q5 x
then5 X- m# [# K+ n' D3 p9 g3 P
@.Destination := void;
9 V$ h# y% F5 X0 V( r2 f: d' D if @.occupied then
, m& i0 B* y/ J8 J" s. e7 {" M part := @.cont;: B( t, G: @. m) ]
@.transpOrder := void;+ I% s. ~# j; v& B7 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# R; i' o5 r! t6 `6 } @,root.eventcontroller.simTime);* o& X: [0 [9 Z
@.HasOrder := false;
1 q, z! p2 y* @. ~& ]1 y* P @.DrivingHome := true;
* M! ~- E. J0 `& _7 p rgManager.tryToStartTransOrder;
+ X, r5 D2 B# {3 ~5 D" Q; U if @.Destination = void
3 U) K' l/ ?& q7 m( ^# R/ N& i9 F3 m then -- no transport order for vehicle @
" T3 ]! j3 T4 q- t9 J; z2 g @.Destination := Y0 r( P5 W7 V8 c" J
rgManager.nearestFreeStation(@,track.~);
( `% K7 W4 u5 o$ E3 o newDirection(@); 0 l8 R) r8 i7 r6 J- c& ^
if @.Destination /= void then
+ r) z5 ~/ F, C @.Destination.NumReservation :=
- j b( d1 Z! v! g0 y1 } @.Destination.NumReservation + 1;
) e( }# G+ L' z, e& f% ]7 v3 h end;' V" [0 C; J( d+ K/ Z3 O
@.CurrIcon := "drivingHome";
- t" g+ I, w! ?" y8 m' Q5 C* W* i @.DrivingHome := true;0 m7 |0 I5 ~6 `3 K
end;, R3 S; T; T* Q' p- ?2 R& @' w5 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ S% }: ]9 G5 U5 b part := @.transpOrder;
8 J9 e. _" o' T* E8 U y. |2 ? part.move(@);-- load part; L: L. f! n7 m- u% k8 K
@.CurrIcon := "load";
& O4 D: b1 B1 j) f5 g( L+ [: q GlobalDistObj := part.globDestination;
+ C4 x1 r/ C! T1 K" S4 U assignLObj := rgmanager.rgAssignL;& R, p$ y0 z( X" A. |, q; k8 w
row := assignLObj.getRowNo(GlobalDistObj);
4 H% O7 c& X& P0 h$ P, t if Row = -1 then -- since 70+ s2 [5 E* N4 o. p: j$ h$ y2 k% ]
if lan=1 then
, x' k! Q" j2 C; n' G$ D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. `% m' {) c8 k7 m+ ?
to_str("in der Andockstation: \"",?.~.name,"\""));7 u+ ^; L8 i. j
else
! [" i0 Z4 l9 Q4 ` t. U2 y0 H1 j; O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 @" i: g7 m* W3 B+ l2 x l
to_str("in docking station: \"",?.~.name,"\""));
9 e4 x, r! L, K, W1 b( b/ V end;
7 e/ x ~$ ~ c- _* C else
- R }; b5 Z- J* L/ n9 { d0 K @.Destination := assignLObj[1,row];7 O0 A, Y' n! K3 a! g
end; ! z0 E6 h, M5 ^2 E( `6 X7 z
newDirection(@);! v$ r, t0 l% I2 ~! [. _# @
@.HasOrder := true;8 Y* I0 B0 N* c, h9 I: A3 `1 h
end;
5 g. ^1 [" _# L0 x* V6 h end;2 v; m" I) y: D4 n! |
end; -- of the method
1 e7 l0 ^4 K7 s) T5 J: @ |