/* called by: entrance ctrl of the object 'track'( J2 ` _' N) L u! E# K, {# [
*/& @) Q: Q( [* X
is
+ Z2 @$ ^! c5 W1 u2 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 A1 O" | F; V# f; b2 b8 Tdo$ r! E: `+ Q1 X( S# x" S' o
Lan := rootfolder.Internal.Tools.AOLlanguage;, ~* w9 s% u7 z9 a7 t& P; K
if current = @.Destination -- else return! G+ V! G, N( i& n
then5 b8 w0 e; L: u/ N- K1 d' v
@.Destination := void;# U* K6 v! s- ]6 M
if @.occupied then3 u+ a# M& w" P9 H
part := @.cont;
% I6 Y3 D& N- c' F @.transpOrder := void;
- d l2 Q; @2 K6 q7 \2 ~$ { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Q+ {8 B2 m) u6 [, ] @,root.eventcontroller.simTime);
7 j8 J, `8 q2 q5 m4 A @.HasOrder := false;6 V" d: }) s- o0 M$ c' [
@.DrivingHome := true;- t) E* E4 }. C6 t
rgManager.tryToStartTransOrder;1 b' H0 h: k3 j, [* _
if @.Destination = void1 p a, @4 I. b/ x4 K5 o. b
then -- no transport order for vehicle @% O& I$ x. i. f' ^& ]
@.Destination :=2 s4 m! ^' c7 e; } q$ [0 }3 h% ?" }
rgManager.nearestFreeStation(@,track.~);
3 p$ Q6 P% P+ ?# S6 w' S' c$ y newDirection(@); - w' b+ G) S$ d
if @.Destination /= void then& B# v) I, F. F9 E4 {4 c6 a7 g
@.Destination.NumReservation :=' h5 q4 n& g( }+ s: x3 x3 G/ I! o$ y
@.Destination.NumReservation + 1;
& j j8 R2 A e" |0 l/ S6 y end;
4 ^4 S# n6 P# a; Y$ b$ v @.CurrIcon := "drivingHome";
2 q& d6 T' M6 b; u6 Y' R @.DrivingHome := true; ^" r' s8 X! r/ R8 X( a4 K
end;
' p" \0 o' g5 c0 ^- v else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i% b3 A4 `" a2 T& |# I5 K; e q; a
part := @.transpOrder;
( _( F$ C) }5 u8 }4 e part.move(@);-- load part5 Q+ C" ]% k2 _" O/ U
@.CurrIcon := "load";/ }- f5 R) }/ f( k
GlobalDistObj := part.globDestination;9 [. B; E1 }8 U* Y
assignLObj := rgmanager.rgAssignL;$ d' a& ] |9 q# q9 K7 m
row := assignLObj.getRowNo(GlobalDistObj);) t6 t! b: ?( L( C7 C1 u. P
if Row = -1 then -- since 703 |/ [5 p4 K8 S8 ]5 _' m6 l
if lan=1 then" z$ v- F6 \0 b* x- k) J# s$ {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* m3 j" d3 g6 F; d3 L( M* c/ v to_str("in der Andockstation: \"",?.~.name,"\""));5 G* ]* b. K) { N) I* O. y
else; u! d y: q: m: _" `6 b+ ^! k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- A* U8 ^7 J9 o! e3 V0 J p) J: j; s# V
to_str("in docking station: \"",?.~.name,"\"")); 7 C' p/ r$ [8 [# Y6 p7 V6 t
end;& L$ k, P% b4 e) c6 J' @
else
9 w* b k6 B: N y* S7 ^& z8 M s2 { @.Destination := assignLObj[1,row];: q5 s0 i* L- o: i# s
end;
& _3 H3 y0 H: o# f7 V n newDirection(@);
$ v9 @# T( c3 k0 V# v, H5 J @.HasOrder := true;8 g0 T6 q& c! J- V, B# I
end;
1 L! a. I& A. D0 I: m end;; ?* t' G! A7 E% D
end; -- of the method
& A' [3 L V" i4 q |