/* called by: entrance ctrl of the object 'track'1 e) k! d% F: E$ m2 S) Z) m
*/4 L% t7 d1 d& \0 L
is
i0 C# C% [: K. r7 l I part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 U j: p s, u2 `5 @
do8 ]8 i4 T8 E6 Q+ v4 [
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 g% h0 e; s6 d& N) j if current = @.Destination -- else return
" W" B& o+ E+ ?8 s9 W1 M then. h P6 h! j5 l6 H0 n: L
@.Destination := void;+ W8 b) z) u3 b0 q
if @.occupied then4 v: D- s3 R/ c/ i W5 F
part := @.cont;
" I. H- S6 ^+ R1 f; Z2 L2 u1 L @.transpOrder := void;7 W! x* g/ B! R0 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* t+ v6 I- g) d. O5 e% o7 w" d% b
@,root.eventcontroller.simTime);
1 Z' K* h+ h6 P( G B @.HasOrder := false;
+ R/ o/ S. c9 x5 B. m3 M8 @. ] @.DrivingHome := true;, B0 j( n9 w$ \% Q: Q
rgManager.tryToStartTransOrder;
$ e" U+ A7 S$ ]; y, {5 M8 t u7 w if @.Destination = void2 ]/ @ ^) W4 r0 W7 i
then -- no transport order for vehicle @# L. Z- m0 }' n" r, J' Y+ ^
@.Destination :=
, X& g. r9 M$ ~2 ^$ m2 d rgManager.nearestFreeStation(@,track.~);
) I+ q- P! Z/ T1 Y* N newDirection(@);
$ I8 r2 |- L& V: l6 B) D if @.Destination /= void then
6 @ @2 B+ G* v- ^. p @.Destination.NumReservation :=
( \1 d3 b5 c( m) F8 p @.Destination.NumReservation + 1;
) Q$ t& G. w/ O end;9 t d5 K# j4 l" W, r1 o/ h
@.CurrIcon := "drivingHome";
. y# X! {% ^- a, V# N: p& y' [$ H @.DrivingHome := true;" U" S, b1 [' D6 @* ^
end;
3 A3 B; Z- v* ]5 Y& ]- E S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, _3 }# N9 D9 m7 ]6 X0 z% A- z, v part := @.transpOrder;( E* ?( [' a) K. n) x6 F
part.move(@);-- load part
. E. I0 L0 P9 Y- H0 G @.CurrIcon := "load";6 H0 P+ M4 v8 Z' p5 W
GlobalDistObj := part.globDestination;
3 K8 n$ v0 E a* b; Z) \ assignLObj := rgmanager.rgAssignL;
~+ |5 x/ r* i$ v7 X% x row := assignLObj.getRowNo(GlobalDistObj);
+ }. N( j4 c" v if Row = -1 then -- since 70' d. W6 E) X$ |1 Z6 |1 S& k
if lan=1 then8 u" e% A2 B8 X6 q3 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," D- O! G2 p7 H* e" g
to_str("in der Andockstation: \"",?.~.name,"\"")); Q ~( F9 F) b5 r7 ~
else! j9 `3 R/ e" H: a9 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! I& W4 F0 r9 k% [* h- c
to_str("in docking station: \"",?.~.name,"\"")); * ?. G" g6 V5 W3 N4 |0 I; L; G
end;- V8 W: b. @/ G! y7 @3 a
else& F5 |% ^, V" i% r: L
@.Destination := assignLObj[1,row];
+ h B; m, m+ ]# N. K3 V end;
9 }- r. t/ {2 a% e* x newDirection(@);; j9 V1 x/ z8 y* s, r1 D
@.HasOrder := true;/ h& Q* U6 @: h! ^3 ? C6 w
end;0 V1 Z ^' P. O. V
end;9 F% M+ ? l; [4 U5 |9 w4 ~$ K7 k
end; -- of the method! w: w4 ~$ R/ K5 h3 L
|