/* called by: entrance ctrl of the object 'track'
4 }% S, @# K4 J3 b6 c# {5 ~& t*/1 t0 z# E$ G0 q7 L" X% }
is
5 u' O; R6 \( V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& M% n0 V6 S4 G9 I- s% G; e( s, Qdo, f( r( y# \% p, S0 c7 e
Lan := rootfolder.Internal.Tools.AOLlanguage;' g0 h" e8 q' r: x0 y1 a/ J. M
if current = @.Destination -- else return
' H5 ?8 w: T/ e6 @" { u then
! N3 w. U7 T+ N @.Destination := void;/ V. S* x {& p1 \, V5 I+ [& i
if @.occupied then
4 _1 j* u5 w; l& Z part := @.cont;
2 |3 D/ l* u$ F6 o @.transpOrder := void;
' W9 U# q8 W+ o3 x/ x. v0 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ s7 C% V8 ]; ^
@,root.eventcontroller.simTime);# ?) n/ x1 K) A& D
@.HasOrder := false;
4 `# r6 h8 r5 T( K+ B2 n( J @.DrivingHome := true;3 p8 M( _. h7 h; Y# E
rgManager.tryToStartTransOrder;
8 X- M; M; u( C+ j" y0 m$ G% f if @.Destination = void5 ?7 H# q$ `6 d* X8 e! d
then -- no transport order for vehicle @5 S( X2 D+ _( ~+ |1 A4 _
@.Destination :=
0 S6 A4 q) z$ h; K6 {) T; P0 S& s rgManager.nearestFreeStation(@,track.~);
6 C6 V8 o6 D/ s newDirection(@); % M% k/ q, B8 p$ P# B0 Y/ S5 [2 ^
if @.Destination /= void then
, p0 A$ W2 P% G n5 } @.Destination.NumReservation :=
: O, u0 j+ F2 E4 I; W2 L @.Destination.NumReservation + 1;
9 ?3 W4 x0 x" S end;" x5 s; u, n0 {" \) a7 b* w
@.CurrIcon := "drivingHome";
8 I% U0 X5 a7 Z8 S3 Q @.DrivingHome := true;8 b9 Y& f1 n: O
end;/ J) d, w6 `- `9 V* l/ \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' B! A' R% q# X# `& g% h+ _7 O
part := @.transpOrder;
( R/ K p" b, _ x part.move(@);-- load part# f$ ?& Y" f$ z# V- r7 S
@.CurrIcon := "load";3 k7 S! l! j* w& P
GlobalDistObj := part.globDestination;
/ W8 m3 x/ [1 Y$ { K assignLObj := rgmanager.rgAssignL;
" e1 Y9 x) s. O7 v row := assignLObj.getRowNo(GlobalDistObj);, _ V, a9 o4 g: {# b
if Row = -1 then -- since 70 G$ u. c9 _$ y+ O7 h
if lan=1 then( B( S9 M, O/ \2 i0 K" M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% t; v" k/ ^* O9 j2 }. B: i to_str("in der Andockstation: \"",?.~.name,"\""));
* K( `- F5 s3 h! ]# X- [; m3 X% [: t else* f/ B: B. Y- W# O8 L% i7 i4 ~2 f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- S+ [! g/ t$ \0 b d" x to_str("in docking station: \"",?.~.name,"\""));
3 W6 R6 \6 O/ o6 s: q+ |- E* \7 I end;
# g/ J3 O: F4 Y- J8 S) e+ b else
: O% I+ @& ]! ?, ]. O3 h' B1 U @.Destination := assignLObj[1,row];
" h$ ~) Q; `6 d* {! T6 ^5 A end;
, w1 s+ X0 P: ?: k9 Y+ H newDirection(@);3 z! M3 ~! l! z% L5 z3 l: [, n
@.HasOrder := true;% c& t) k8 ]; s8 q7 y+ V
end;
8 y8 M, b9 |0 `% ]4 q) [ end;
+ b. a* P Y( [6 f* B: jend; -- of the method
& B2 Z5 r# u# Z" T0 a- Z$ V |