/* called by: entrance ctrl of the object 'track'& k& ~, C( U2 p; V ]5 c
*/
6 u; ^" s9 @, [' `* X' bis- F2 f9 l2 e1 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z" B, \7 }* c( f- X) M& i3 ^1 H0 T
do' j& g3 u0 O; v! q% h+ j g
Lan := rootfolder.Internal.Tools.AOLlanguage;/ \8 W, c8 c) l2 e9 g. U2 d+ P
if current = @.Destination -- else return, _5 p0 I8 f( \+ S7 c' N5 Z, @+ Z$ R, L
then1 ^2 s* d% t/ i+ @& L O
@.Destination := void;1 e2 ~2 r0 p0 B0 } h3 q( C* m# Y; l
if @.occupied then
9 U, |$ i! ?: z2 B. f part := @.cont;8 [" j8 S8 N# T) I
@.transpOrder := void;
& F8 k" i: L! E* y# C6 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 R [ ^: t: M: l
@,root.eventcontroller.simTime);
4 z* _ s4 O, f" J7 \8 e+ ~9 s @.HasOrder := false;
3 m/ z8 B! }; K* }# _6 d& I @.DrivingHome := true;* m5 q6 A3 p1 h! {
rgManager.tryToStartTransOrder;
% s/ F* {/ g& L g6 g$ x$ ? if @.Destination = void P; R$ V6 G$ }' R( S% R
then -- no transport order for vehicle @
- P: P! K) x. H& ^ @.Destination :=: O n$ m# ?( ?# Y4 k
rgManager.nearestFreeStation(@,track.~);# J5 X) u$ d5 j7 z
newDirection(@); - f ]& Z" {1 O
if @.Destination /= void then
: @" e* k8 Z. ?* n @.Destination.NumReservation :=
$ k" o7 X1 k% |6 S5 ]0 k4 O @.Destination.NumReservation + 1;( t3 Z4 J+ h9 o6 Q
end;: i* U, I. O# H4 t1 I
@.CurrIcon := "drivingHome";3 V) r% M8 \) P! K9 B/ Q% F+ ]
@.DrivingHome := true;
; M' v$ [: X! H0 W( V2 U end;6 a* ]* K/ P! B( z$ K& x' a2 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' R: r0 G. |2 D8 [. q( l. H, A
part := @.transpOrder;
/ i5 [$ O9 _ h! `* i3 D( E+ ^ part.move(@);-- load part
4 v+ q' g3 p$ i' D/ f# f& D @.CurrIcon := "load";8 [8 ~) i+ }! N; `
GlobalDistObj := part.globDestination;( D% V# A' u' z3 g& j1 a
assignLObj := rgmanager.rgAssignL;3 M+ ?" u0 |4 H# k5 v9 [6 ~
row := assignLObj.getRowNo(GlobalDistObj);
^+ d m+ j* ] if Row = -1 then -- since 70
2 M; P Z4 M; h) W4 E if lan=1 then* g% D' ]4 F$ p) a+ V5 O1 z/ l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( N5 Y/ Q# P9 l9 z to_str("in der Andockstation: \"",?.~.name,"\""));
. p# D y5 v3 c- g else
, ^0 {1 q7 w& n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 B' |0 f2 l) ]# [1 C# H+ o1 D to_str("in docking station: \"",?.~.name,"\"")); 4 R+ F# S0 l! ?- e
end;
$ k0 e% I/ w- Q. } else
. g2 e* r1 i6 z- |3 i @.Destination := assignLObj[1,row]; `3 ?! k9 e8 T! V: f
end;
0 T. i$ |2 R2 h6 z p% ~% }* I newDirection(@);' Z4 Y" S' L7 y
@.HasOrder := true;0 r& O8 L4 P/ [1 k3 G
end;- U" r$ n4 o# g% O9 ^
end;
$ Y8 t5 _0 L& ^' b4 L9 Gend; -- of the method
" |4 s1 e8 L9 i |