/* called by: entrance ctrl of the object 'track'( F% e, i0 @: o7 o
*/* |) M( ^0 }3 i/ l& } [
is. f) X8 k% d! z; |5 @0 |0 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ F6 [/ o2 L& I( X( m
do
" U; u# G& W. ?* Q4 Q: d Lan := rootfolder.Internal.Tools.AOLlanguage;
" g# r* A' K( d2 ` if current = @.Destination -- else return6 g- a2 D& z) q: t
then
6 O( u- @& v, ]* M2 w8 d% w: { @.Destination := void;6 y/ W8 V* Y |+ N$ B: C' E( v# P: `
if @.occupied then
* u9 r! L4 {3 P part := @.cont;
% b4 S) l) ~' s. y& C/ @* |% V @.transpOrder := void;' A( |& |8 N5 \) L( t! A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 G& G0 j7 M6 }7 x3 P
@,root.eventcontroller.simTime); d5 G( Y S! h6 M' f+ x+ D
@.HasOrder := false;9 R$ P, Z0 w3 _7 Z( S r5 B
@.DrivingHome := true;
' W3 [0 t( m' N4 G% O* ] rgManager.tryToStartTransOrder;+ V/ F: L! o+ K8 d6 H
if @.Destination = void3 H4 H0 [" \9 y
then -- no transport order for vehicle @6 t) c: O, H# P) M% ^% [ W3 l
@.Destination :=
8 e( f- Y' Z6 {' a A5 R, P8 l, ~ rgManager.nearestFreeStation(@,track.~);
9 D! |0 L- P5 t4 `; G newDirection(@); [; S( M5 m, r) Q, B! d6 X
if @.Destination /= void then
/ x0 h, F0 D' i- A8 l B5 v3 e: H1 r @.Destination.NumReservation :=
1 Z0 i5 }" }# \# e3 [ @.Destination.NumReservation + 1;0 k1 ]4 @- x/ \1 z u. d
end;
) z+ {5 G( q6 n, O, | @.CurrIcon := "drivingHome";
, W. E8 S W! L4 j6 `! {# L) n @.DrivingHome := true;: ~2 @3 c8 J0 ^; e# `: |% w
end;
2 b. e3 `% K$ X0 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 a" Q9 C! n1 n/ f0 j7 b$ D) N part := @.transpOrder;6 [5 o7 Q4 O x) f$ U4 f
part.move(@);-- load part! e; c/ u8 s3 a& m3 ]
@.CurrIcon := "load";
# o* }3 k% |4 S; m2 r GlobalDistObj := part.globDestination;
0 g9 V+ e; n5 Q5 t0 L0 w: ] assignLObj := rgmanager.rgAssignL;. }9 u6 C z, g; ?# d/ h
row := assignLObj.getRowNo(GlobalDistObj);
) n2 [6 T" U$ i0 H3 e, u1 e- E if Row = -1 then -- since 70
; H9 [+ q% m6 h& J+ i3 e if lan=1 then" U- A" ~% }# y3 e+ v+ H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 |5 A" `) j. P. ^3 ] to_str("in der Andockstation: \"",?.~.name,"\""));7 c/ [2 V- M# S+ U7 f! N
else
3 E; b* ]# {5 ]+ w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' d- S5 H, F; `* h1 `; B
to_str("in docking station: \"",?.~.name,"\"")); 6 T5 a, f4 N6 z! q7 ^8 l) H/ P
end;
' s+ k, s, E6 N( q else ~! u& s/ F- K- g/ C! x0 ]
@.Destination := assignLObj[1,row];
]8 c: R9 j6 |' ^ end; 8 a4 \7 o" s5 n& I+ }% p* c: n
newDirection(@);: f8 j+ U$ i1 b
@.HasOrder := true;
$ G& [0 X) B# J- K. L' c; m' | end;7 [2 y, Y+ E3 @$ c. v2 N, L' N
end;: r8 p) X! R0 ~& s% L
end; -- of the method
; `* H" B, ~" g- f# |0 t, A |