/* called by: entrance ctrl of the object 'track'
' c! o9 y- x3 [*/
8 }7 r9 t1 o; G$ E7 x/ O2 Dis1 v* `6 N1 u2 F5 C% p6 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- I0 n, `; ~% W. z. Mdo/ Z1 s, b/ W. l3 R4 v
Lan := rootfolder.Internal.Tools.AOLlanguage;" e: Q# T1 U7 k
if current = @.Destination -- else return
* |" L, R5 Y% W' J then
2 e! F x" ?6 R, _ j @.Destination := void;
- t0 @7 ?( ]4 Y8 v if @.occupied then
( g3 k! P7 x8 R, [5 O* D9 ~9 p9 a part := @.cont;+ J' L+ W# S+ B+ I/ D% R! R
@.transpOrder := void;
5 f$ q8 q6 v0 e& B) ?, N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. t/ p# q7 h, X) j& X3 B [! s. G
@,root.eventcontroller.simTime);
7 k- E+ g3 g! a3 X1 s6 q# y2 f @.HasOrder := false;. N& M9 ]8 `6 H' F% R# |
@.DrivingHome := true;
% ?! q' Z" t% S9 t$ f rgManager.tryToStartTransOrder;
4 g; }% c) E, Z: D# T if @.Destination = void$ ]! m3 F- V& A' {
then -- no transport order for vehicle @/ v+ J j3 b# g8 i
@.Destination :=( z' C, ~2 Y* i/ t
rgManager.nearestFreeStation(@,track.~); l1 d5 D( Y* h" l1 P, N _. V
newDirection(@); 4 ^$ Z! O7 W7 P
if @.Destination /= void then
, D3 p2 B( ]- E u" M @.Destination.NumReservation :=
3 h3 E; Q2 f( m( z @.Destination.NumReservation + 1;
% H- Z* u4 v8 [1 a" M, q: m end;1 X% u8 e4 h+ u) `1 t
@.CurrIcon := "drivingHome";
. s* k: J3 ?' r4 J J7 } @.DrivingHome := true;3 l6 z2 a6 I: Q4 V) b
end;5 c1 b% `! a( ` `. Z, h Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% G" T% U2 a6 y7 M" {( V' [ part := @.transpOrder;4 I: N3 E5 c1 n7 b8 Z- O5 }7 y
part.move(@);-- load part
. D( K. p. y* M2 W0 H# F% T' F8 T @.CurrIcon := "load";
0 I- u' f+ m% i2 ~/ P6 Z0 D GlobalDistObj := part.globDestination;9 h7 Y. O) f& g/ i9 }4 _) w
assignLObj := rgmanager.rgAssignL;
: _! Y3 p8 ~5 `7 @' m G row := assignLObj.getRowNo(GlobalDistObj);8 s& {% O$ p' {% G1 m) S
if Row = -1 then -- since 70
! [7 C- B r4 j( g; I if lan=1 then% R/ M: I6 I/ {0 A7 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( m1 j4 Z4 |% ] ~; v1 j/ Y# Z5 x
to_str("in der Andockstation: \"",?.~.name,"\""));2 R. [% \% s. F% U8 d# ?: ~
else
" X. h' s7 f8 |( \) V1 b7 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& p4 q1 S x( @. r; R- e4 j
to_str("in docking station: \"",?.~.name,"\"")); , R6 f( Z$ w* x
end;9 ?* h8 j/ y5 z+ V0 f, d
else8 W" ^* K! T4 Z
@.Destination := assignLObj[1,row];
1 d7 V; ~) I0 W# E4 n( @8 Y+ f end;
2 A9 T" B% ?: _' j& j9 R newDirection(@);
% P' O }* K7 P+ A9 O' |1 V @.HasOrder := true;. y$ Z/ R2 L0 h5 {4 |2 y
end;2 q$ f* V7 \9 R' m
end;
7 j; T1 U, L+ send; -- of the method
* w1 d- \6 |& b& l; u7 G$ o |