/* called by: entrance ctrl of the object 'track'! ]* Y' @/ M: u& l( K
*// e9 S- U# m: S! @
is
& [5 n; V8 Z1 E) Q+ F$ R& K) R2 j9 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;) g3 I1 b9 d# Q/ T
do( j7 p' Y* a3 c1 g9 f0 R% L* Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
: x1 Y* ]) R. @8 W0 r, y6 Y if current = @.Destination -- else return
1 a% l/ m* N( Y s& A/ h9 B then; m1 z" C) w( M5 N/ w
@.Destination := void;
* U, N/ N# X' l& B if @.occupied then
3 X" w: }9 b! k, z/ S; s part := @.cont;1 [; N; ^$ s* c
@.transpOrder := void;7 U, L$ s6 H" S9 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- h2 e! P. |' Q* g% ]# [
@,root.eventcontroller.simTime);
B& g4 K$ l1 ?6 c. x @.HasOrder := false;
% u. A( e: \2 O: n- L1 p @.DrivingHome := true;
* e; m2 R7 |% V( z$ Y x rgManager.tryToStartTransOrder;! A" A* X! p: E" A" q$ w2 s7 R
if @.Destination = void! p4 _* ^ q8 @; w
then -- no transport order for vehicle @( D9 S+ G* W7 c8 q
@.Destination :=
( _% R1 q. T5 Z7 o: Q rgManager.nearestFreeStation(@,track.~); f1 ^" B# T5 K/ W# o* M- n0 t+ S
newDirection(@);
6 e& S% x3 ~, P if @.Destination /= void then
0 B4 g& U! x0 f0 b @.Destination.NumReservation :=' N( A; `8 w+ |) i2 n
@.Destination.NumReservation + 1;
/ [4 c; f3 D/ G2 M; @5 }2 G/ j* P end;
- K3 H( _3 E$ K5 S- d: W* u$ v. D @.CurrIcon := "drivingHome";. Z( u0 Z. e- B6 K, b3 l
@.DrivingHome := true;
1 c* u" E9 ?- X3 J end;
- {7 U# \- p: v; N/ w; d else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 i2 Z4 B/ H. q R4 A
part := @.transpOrder; ~$ G: m* w- P( i- z
part.move(@);-- load part
6 ]1 s9 _. G0 n2 t7 H5 J; ]$ _ @.CurrIcon := "load";3 L( B8 H- ]9 f" i
GlobalDistObj := part.globDestination;
5 c& j4 z) E" N+ J% j assignLObj := rgmanager.rgAssignL;
# I5 r4 H% h b2 t9 w9 N/ L row := assignLObj.getRowNo(GlobalDistObj);% O5 s/ G% R7 v
if Row = -1 then -- since 709 A+ k6 k7 t% s2 E9 y
if lan=1 then, M# X; C/ J2 m9 @& Z' V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 ]4 F6 \( ^* |7 s6 O
to_str("in der Andockstation: \"",?.~.name,"\""));! k# _$ g8 |$ I- y2 J
else7 ~& [% l* {) E3 S( F+ e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! v3 C0 i* J% {, X( ?( ]: l1 f; {
to_str("in docking station: \"",?.~.name,"\""));
2 l x- y5 a: a end;. t# x( _, F* x; X" u, e" n
else
7 d3 @( q& N( O+ P p7 t! k+ [2 E# U @.Destination := assignLObj[1,row];' j }- g/ V) T
end; 9 d! p! f* u' s: l! u
newDirection(@);
" r& g* b1 V3 G. U# i @.HasOrder := true;5 D% X; K: u1 a( C0 E
end;
& y( o+ w6 F c) |7 T8 ` L end;
) y5 K- u" G7 g/ p yend; -- of the method& G$ c, I- u8 }8 E, D9 \1 o4 n/ [( _& x
|