/* called by: entrance ctrl of the object 'track'( k5 i6 u( r5 p" X% n0 _/ g( g+ [
*/. E# ~( P2 R7 x: E
is; E: ^9 _/ M& o: a8 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 L7 r* @" U, O) Ydo
/ S o: S' ^' w8 f& m Lan := rootfolder.Internal.Tools.AOLlanguage;
) B) i0 P2 f2 u. P% S6 f3 O if current = @.Destination -- else return2 C1 L7 `( G; r$ b% V1 [: b
then% v. d! n* K* V7 [6 \+ Y# l5 g
@.Destination := void;$ i. v5 B# S1 w2 r1 f$ x+ i
if @.occupied then* N) H/ s# i0 ^! T+ k% G
part := @.cont;7 o* Q2 z8 b1 s+ f! S- T
@.transpOrder := void;
- g4 |2 f! F5 N! f0 J: x& _2 c$ T4 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 I# P0 s* H% U) {) Y
@,root.eventcontroller.simTime);0 g2 P8 H; j' a, K, `1 _
@.HasOrder := false;4 Z H; O! K. `/ n' F
@.DrivingHome := true;
0 W3 y' p' d5 } rgManager.tryToStartTransOrder;. M3 ^, ^ J o$ r+ S
if @.Destination = void
; k% m7 `! S' Q) e9 h& l7 C/ i2 L then -- no transport order for vehicle @
- {& e2 ~( L; U1 }: a: ~' F8 q* F @.Destination :=' {3 Q+ m: N9 ?- M
rgManager.nearestFreeStation(@,track.~);
5 z/ S0 m) t6 _5 H- U' ~ newDirection(@);
/ G+ c. o) x% J- ~% s% w if @.Destination /= void then
9 w3 U* P) `6 J8 T9 H @.Destination.NumReservation :=
; m7 {( o- o, Y% Q; e8 N& b @.Destination.NumReservation + 1;$ t& d: v) O( X
end;. V! z, n0 B6 m
@.CurrIcon := "drivingHome";
) P6 |/ T1 {6 O( G% g3 w @.DrivingHome := true;
1 S/ H( C9 F, M) e1 k \8 |! e end;
, B: p3 {$ X( T+ o9 E; a8 I) H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, _) u" y+ k, Y part := @.transpOrder;
7 Q& R) ]% x& u% {1 L. a5 f4 W! B part.move(@);-- load part9 c5 e" q# a6 \" k* p7 G" \
@.CurrIcon := "load";4 W2 O/ f3 }6 ?) ^
GlobalDistObj := part.globDestination;
; z4 t9 F$ S: e( s& q assignLObj := rgmanager.rgAssignL;+ J; b0 v/ B% u1 z: r& Y# }
row := assignLObj.getRowNo(GlobalDistObj);6 V3 U$ e$ y* [0 p+ p3 K) F
if Row = -1 then -- since 70; c2 ~+ X D U+ i5 \ q/ x
if lan=1 then! j6 b3 `, k: a2 H m. Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 D N; T9 ?1 Z% W
to_str("in der Andockstation: \"",?.~.name,"\""));
1 Q6 M1 Y% b2 ^3 g9 D else, l o5 J9 D- ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 n$ s. l8 Y5 L$ \ v7 f$ R to_str("in docking station: \"",?.~.name,"\"")); % v J- M4 K- d! a, F' C6 g
end;2 D- W; [8 @6 r. T* J; I1 M# ?3 H
else
% r) O7 {" X: T) E" a( v @.Destination := assignLObj[1,row];
6 H1 f" i0 E0 F- {) `) _: e9 q end;
; b9 J; X! o' D* {6 J4 C newDirection(@);7 q m' ^# j9 e0 l1 j9 E6 p
@.HasOrder := true;8 _8 x7 U6 ]7 y, q
end;8 z, o3 D* k" }6 X" P6 t7 E S3 R
end;
2 }7 ?6 _" \1 I# K4 M* g0 Rend; -- of the method
- d9 R5 K7 E- H1 G, s4 p& |* s: r |