/* called by: entrance ctrl of the object 'track'
5 U, j& }4 V6 g+ j* ]2 N+ V! n3 J*/" S, B& ~# e% }. Y7 [" ^
is4 S( q1 x8 C5 v/ Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 U4 {! u1 D2 v0 s
do3 Y0 m6 p+ d& X! }3 h
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 h- A6 j2 F. r2 m' [" g if current = @.Destination -- else return
% G1 y$ R$ M$ e- Z then7 s) @' R' @1 S& M. B7 V: c
@.Destination := void;' j) }& W7 r9 K) d' p
if @.occupied then
# g: l3 C6 a% N: ]$ b' K part := @.cont;9 |6 K( y1 X8 ^/ p9 m0 e' R
@.transpOrder := void;
1 x+ K. t8 z3 p4 W6 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( \' F; _- c# y4 ?# ^) @5 {0 D
@,root.eventcontroller.simTime);2 r. x& U/ K, ^# [
@.HasOrder := false;' M( ]4 R* q* K% Q# M _% M1 ^2 w
@.DrivingHome := true;
( v9 T1 g' D/ c" v# ]% f! ` rgManager.tryToStartTransOrder;
! S- h* y; o% |* h* V- o4 Q if @.Destination = void$ Z' g; ~! ]2 S5 \6 X/ |
then -- no transport order for vehicle @
3 u8 y# \6 ?7 Z$ ~& p4 u @.Destination :=
8 m( v7 X' ?1 z! ^ I rgManager.nearestFreeStation(@,track.~);0 V& i$ N6 u* M4 W9 t) m1 r1 q; w
newDirection(@);
6 {* g0 O, l% l+ P# t T/ @ if @.Destination /= void then
7 t) ]$ m+ c) [ @.Destination.NumReservation :=
7 g4 E% z9 j! ` @.Destination.NumReservation + 1;
3 ^. w. C' I! Y end;% M; j/ `% B- P
@.CurrIcon := "drivingHome";
7 B# T3 T( k a. J @.DrivingHome := true;9 V. J# w% a2 C ]. o
end; l \0 a0 W2 a) `2 u: B) u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ @7 S8 ^: [9 M- R4 s
part := @.transpOrder;3 Y: |& \. h4 L# Q$ U0 _
part.move(@);-- load part
, E* {1 }2 L& n+ O4 o" I3 `1 E @.CurrIcon := "load";
; B3 x' F1 W& ]/ S7 H5 U5 m2 | GlobalDistObj := part.globDestination;" N+ N5 D$ U, x1 e9 n
assignLObj := rgmanager.rgAssignL;" N* D9 q7 T3 r7 A0 \7 P9 c+ |( w
row := assignLObj.getRowNo(GlobalDistObj);
) G. C; e- d5 ~/ ^& e. k$ H! { if Row = -1 then -- since 70* Y% p" Z2 _& }& [4 x2 c/ m9 U2 }. V
if lan=1 then3 v$ h5 @& S! ]) i5 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N" e. E* t1 ?- J to_str("in der Andockstation: \"",?.~.name,"\""));
r0 \7 v" |3 k$ ?0 o else$ _6 `( S* i3 |+ D! X+ L: P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( j3 y9 k7 n- A! }' P
to_str("in docking station: \"",?.~.name,"\"")); + n: f% T5 ?$ f+ w) H: }
end;+ x7 |: n: ^$ V8 p
else
q4 L7 G4 G. T o( d @.Destination := assignLObj[1,row];- o! ~% z \! X% E4 Q7 N& F
end;
0 \+ q Y+ k% J8 }: q) c0 e: ]& j newDirection(@);
2 u0 @1 P$ y6 o/ c" | @.HasOrder := true;
5 m: j; ]. _! F. Q, c. V end;
/ ^6 w) |& u4 P. t( b6 x, Q6 l end;
" w! ?8 u% |! c W% Yend; -- of the method
: ^0 g7 L: q, F4 ` |