/* called by: entrance ctrl of the object 'track'
0 U, F0 R5 R8 |% U s*/6 [* O( K( X4 ~( Z+ k/ M3 r
is
% L; U( @, W# r0 j: h% k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ `6 q S8 ?+ L# }5 T9 jdo
7 b r" t# Z* l; |2 `+ d+ c Lan := rootfolder.Internal.Tools.AOLlanguage;
* j7 A7 x7 d) }9 M" Z% L if current = @.Destination -- else return( q; @! p* S; r) \; F9 V
then# n( ~+ |) O; f& E9 J1 ]4 |# I
@.Destination := void;% T B$ Y: J. } J' c. \: ~
if @.occupied then
. S0 M; ^, N5 h* K) q part := @.cont;1 n, D. G, o3 }* e
@.transpOrder := void;% S2 ^% f) p1 N5 `, M m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 q3 ^: A: I3 [ B# p, D1 s2 ` @,root.eventcontroller.simTime);2 J! ]5 r) l5 h2 c9 ?" H
@.HasOrder := false;" K% T9 O) _/ `' R7 s+ i9 n
@.DrivingHome := true; Y2 `, `( d* n# p* V2 W9 ]& ]
rgManager.tryToStartTransOrder;6 h5 L5 i, b! J
if @.Destination = void
4 {. T- Z% ?5 W! `4 |( o( m! ^* N then -- no transport order for vehicle @
3 z6 {4 \1 y. W5 e; j4 Z7 N- | @.Destination :=
1 B5 J& s: t0 c0 M0 D( B rgManager.nearestFreeStation(@,track.~);
* d6 w; ~0 ?8 m: F9 F% u2 X newDirection(@);
' R0 K1 B0 v! U0 g if @.Destination /= void then
8 X; ~5 B) k* \3 j6 G @.Destination.NumReservation :=) P' v. U1 P3 ~1 K- H3 u2 R
@.Destination.NumReservation + 1;
! X$ b. {2 j% R3 ^* b9 o* o+ E9 @ end;
- P0 g! S, u, `& A- _9 r @.CurrIcon := "drivingHome";
- c9 y& J* S2 ]2 I @.DrivingHome := true;
Y! \3 V C, d* U end;
( b2 C7 Y! _8 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ I" A {: X8 c8 q$ ~0 e) V/ {+ f0 M2 P part := @.transpOrder;* ?! o6 K6 a; l2 q+ X. T2 i
part.move(@);-- load part& p% d: v( l( z- |5 E/ z% z
@.CurrIcon := "load";
w2 o# Q6 Z0 I M- w) }1 c GlobalDistObj := part.globDestination;8 z# X' d! {/ q: j' }
assignLObj := rgmanager.rgAssignL;/ Z: }. R1 n7 Y
row := assignLObj.getRowNo(GlobalDistObj);
" X( S) X; |3 a: [" i* h' o9 L8 d if Row = -1 then -- since 708 X# z C6 p7 v& b. m9 R+ _
if lan=1 then
' M O, ?! j' E- v6 W' ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ x& A- _! Z" D8 N& N' d to_str("in der Andockstation: \"",?.~.name,"\""));. i% ^/ X7 `1 a, \& Z$ G: P% [1 w
else2 k. D$ ]0 Z4 @0 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 N( S! ^& ^7 U9 H# o. \
to_str("in docking station: \"",?.~.name,"\"")); & }2 N& }$ \# G! S; X
end;
- P U& O' k9 T& b% B' l- R else
" b8 v0 S, X, v8 g( Y. Y& K1 n+ k @.Destination := assignLObj[1,row];
0 ?- K6 B+ _ `$ p+ l, v p end;
% P D4 ]) K2 Z+ g0 N; |# @ newDirection(@);3 U6 \* u" E g4 n) g
@.HasOrder := true;/ i$ d9 @. M4 G4 ?& t5 J$ z3 a x
end;5 }# l- w) ]$ P- h3 p' J$ W
end;, {7 m, ]) b3 [" O
end; -- of the method
" d7 V7 M1 P0 a4 Z$ y |