/* called by: entrance ctrl of the object 'track'4 D) c( G5 D7 w/ i; a2 k
*/
2 c' ]9 O# u2 {# b- s' tis
4 E" Y/ X* o, ^, R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& _/ {: h# |, f: b- ?! a1 ldo( v- n+ `( T5 t8 Z, Q; O2 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
( c) H0 u# J6 ^" o8 i if current = @.Destination -- else return
8 {8 H6 C9 `, V; K, t' e. D) N then
( e( ?+ y5 r8 R/ F# ]8 w4 n' T @.Destination := void;
% ^. O4 h) u) V if @.occupied then9 U5 k- Y5 O5 ~( _
part := @.cont;+ T% F; b* G! J7 l! s
@.transpOrder := void;- q* @0 d% m: V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& G5 r, H# U5 N, {$ Y. {# |
@,root.eventcontroller.simTime);
1 J+ G8 P: g0 h( Z @.HasOrder := false;
8 ?: U# t% n( I' b+ o. M; S- B @.DrivingHome := true; z/ |. H( i2 B4 U% D) ?- G
rgManager.tryToStartTransOrder;
2 z0 d: i9 o8 E1 d. D7 t if @.Destination = void
, {. V9 V7 B2 W then -- no transport order for vehicle @ y H" G, U0 C: s- W
@.Destination :=( e- N2 |8 [4 l4 n: l
rgManager.nearestFreeStation(@,track.~);3 b- R3 q" G+ A1 D
newDirection(@);
% `0 L5 t9 C. N; B' { if @.Destination /= void then
0 a8 M8 F, Y, j0 A2 t+ d2 ]3 d @.Destination.NumReservation :=
! Q9 }1 Z+ ]9 ` @.Destination.NumReservation + 1;( W9 v& d6 f$ i
end;5 D9 W' s c0 ?* y/ V' S
@.CurrIcon := "drivingHome";
1 E/ v- r+ x/ ~/ k. Z @.DrivingHome := true;
2 Q9 O u# Z8 { A4 i* Z end;- z4 o3 ?' b" `+ v9 v2 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 h8 d% J/ s g) s part := @.transpOrder;
' b8 z0 }) h& O0 y# C; ]1 X( r' G part.move(@);-- load part7 q3 ?; M% |# z9 ]( [! I$ @+ a
@.CurrIcon := "load";
N! A |2 I& Z/ l" z GlobalDistObj := part.globDestination;! W L; q/ A0 W! n- I3 W$ e9 B
assignLObj := rgmanager.rgAssignL;: f1 y5 B4 |4 ]
row := assignLObj.getRowNo(GlobalDistObj);
& g/ ^& J) c" L$ o if Row = -1 then -- since 70# g- N3 L) T( b/ {
if lan=1 then- z4 d! \4 F5 r* [: V$ }7 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- O1 v8 B2 V3 c8 B' w' |; Y
to_str("in der Andockstation: \"",?.~.name,"\""));/ P* d. v) |# u: ?9 k7 i( [( m5 ?* f
else/ ^( }" G6 p( e2 R1 z( y& b7 a& ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ]" |, @% ~/ Z9 l3 H to_str("in docking station: \"",?.~.name,"\"")); : M7 n* C( s# X: Y- c" Q
end;6 t y2 v* T" d7 A2 u
else, ^' O3 H: \ f6 Q: o' \& e
@.Destination := assignLObj[1,row];+ P6 u* Z p& |! o5 ]' F
end;
9 E8 x; z, i4 ]) E9 T/ n& q b newDirection(@);$ j( x. j- k* S' F8 d% i
@.HasOrder := true;
. I9 Z4 R* k' v end;& q0 z: `3 B( m6 G( `% ^: u1 R. h
end;8 S, Q) B {2 x
end; -- of the method
) f z0 R/ X; I$ @5 p |