/* called by: entrance ctrl of the object 'track'5 H p9 T, v" [9 \3 z
*/
6 Y3 j/ P& b2 |7 P. \is
* B3 [+ \& K9 q: R9 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 o6 q0 i5 b: A% @- m4 ydo) `4 o9 |$ C) e1 ~& e1 b
Lan := rootfolder.Internal.Tools.AOLlanguage;
' d( l) e( V( p+ ]+ T- y! ^# r if current = @.Destination -- else return
. _1 }& N2 h% F/ ~" a2 |; C7 q7 t then
7 c+ ^0 u* K) w; I7 P' A) @ @.Destination := void;8 X4 G( ^- [: E# n2 u! I x
if @.occupied then
0 a2 r# K4 q" F0 C2 u& d- o3 O part := @.cont;
& [ B* G. s. G D& q4 k @.transpOrder := void;
/ c/ c9 l8 }% V9 B1 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# t& `3 Q$ ~# P' L5 }
@,root.eventcontroller.simTime);
6 t$ {' C( Y, o) _3 T @.HasOrder := false;
) I$ U. L7 B ]& j* I @.DrivingHome := true;- g" r* j' x; W0 l* U8 N2 S& A
rgManager.tryToStartTransOrder;
! g q* A" k: Z" N if @.Destination = void
% k) s& C) c8 e( z* s7 L then -- no transport order for vehicle @
5 J% _9 y ^& A; G0 Y" C; i5 j @.Destination :=# W$ }- f. R2 H+ ^: o* P" }% V0 h
rgManager.nearestFreeStation(@,track.~);1 m" S! Q* v/ W9 l x w) y
newDirection(@);
% L! Q/ a' _3 f2 b r if @.Destination /= void then0 e& l! l- n% D. d
@.Destination.NumReservation :=. N7 } y" T3 F; L8 N" l5 v
@.Destination.NumReservation + 1;# w$ @" r! k$ [% C7 Z' Q, O2 {9 X
end;4 m0 t' i( ^. n7 \9 ^1 K
@.CurrIcon := "drivingHome";
$ n/ \; |# H4 F' ]; a4 ^" R @.DrivingHome := true;
2 H% m$ U) }+ e& }7 `; \ end;1 n( I2 z3 Z' ^6 y: |2 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 X6 | E7 ]( |% a; n$ c part := @.transpOrder;8 P5 `" X, ?/ N9 Y4 v3 _
part.move(@);-- load part
) r1 k) I0 c- \5 h2 J' s @.CurrIcon := "load";
$ r% g- D! W* _ e* W GlobalDistObj := part.globDestination;4 S8 r; S. n: r& K
assignLObj := rgmanager.rgAssignL;' |4 j- b+ u$ e1 k. ^
row := assignLObj.getRowNo(GlobalDistObj);" X" E% D0 x2 H' r, R C8 w/ u
if Row = -1 then -- since 70
9 q$ a: J d% b) G8 ~4 P if lan=1 then
! Q( f6 A! n% X1 r% O- | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! F& d6 L! h: S3 }% d
to_str("in der Andockstation: \"",?.~.name,"\""));
1 r2 C- E! n$ G* t( n0 ^ else5 s: e8 a; E9 f* s8 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! @6 Q- F9 u3 p& N' k/ B
to_str("in docking station: \"",?.~.name,"\""));
4 t( x- P% y: ]) Q/ d1 | end;' X1 y( b2 O. A) ^- W& e* E& |- j
else
2 C6 v: d: D* x/ [ @.Destination := assignLObj[1,row];
. B' g" Q; J& y) M end; - `1 c* ~2 q6 i7 c3 i0 A
newDirection(@);
! f) W: f$ m5 l R0 h5 D. F) U) J @.HasOrder := true;
5 q7 @4 Y) B1 \# ~7 x end; ~; Y( ?- A! ]& d- t
end;7 `/ {9 B$ C3 R
end; -- of the method
/ S% \( i0 |, r& @" U8 _) x5 U) _ |