/* called by: entrance ctrl of the object 'track'
& E0 w- Q# g! \; Z3 |*/* p. K" A i; }
is
- c2 P1 U: g# o part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 @+ r) f, |; I5 E& X# n- k
do
3 E8 }& l) e9 V" w" Q" g Lan := rootfolder.Internal.Tools.AOLlanguage;
, N. E% f V1 N: F' p5 Q if current = @.Destination -- else return& x& x' _4 `* b# P& H
then% L* {. U, H+ x" `% e
@.Destination := void;0 q$ P1 B% R( j7 b/ i% d) \3 I5 n
if @.occupied then
1 `0 d/ x, z9 u& o part := @.cont;
! J1 l( K3 ] P0 y0 d @.transpOrder := void;4 Z# l/ `/ u& p+ z' O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 X v/ O2 P4 q; X6 Z' h0 b- j @,root.eventcontroller.simTime);
. Y! d: y& ~) V/ U @.HasOrder := false;
8 K; `$ H/ V0 }+ [+ j2 F @.DrivingHome := true;& I( R. U5 y& X% y' r# ^. n! J
rgManager.tryToStartTransOrder;5 g) P q) _* r$ ~# P) d+ `# Q3 p
if @.Destination = void
# d2 v& h# H% ?5 o then -- no transport order for vehicle @' O. w1 O8 | Z9 P# r1 M9 W" q
@.Destination :=$ [: X2 S$ f3 s% H+ A" R0 v
rgManager.nearestFreeStation(@,track.~);
% q0 _2 D9 r5 e, o( A newDirection(@);
$ w& U$ z+ Y& X if @.Destination /= void then( h# D5 b+ o/ g4 s$ k$ o. \; j
@.Destination.NumReservation :=
# N. Q& ], W, s* S @.Destination.NumReservation + 1;+ x7 l# O5 c! _$ V, p
end;
3 A& B) z7 U* ?9 p/ y T4 L4 [ @.CurrIcon := "drivingHome";# A0 ]" n# q: O; Q- j4 q, p
@.DrivingHome := true;' F) Z, X. G" p
end;& G3 O6 M# i# `2 I2 ~2 i, c4 Z: U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 E" d/ P9 R+ ?" T part := @.transpOrder;1 F; Y4 a$ x p, [1 z
part.move(@);-- load part {; F* H6 O! L0 f# J2 F9 B
@.CurrIcon := "load";1 x' e# `# ]' v4 b: n
GlobalDistObj := part.globDestination;! [3 @6 x S3 u+ E ?% {+ U
assignLObj := rgmanager.rgAssignL;
" P" C. p: T |1 Q row := assignLObj.getRowNo(GlobalDistObj);4 G: c2 b& |# q2 k$ E2 @
if Row = -1 then -- since 70
2 z# X1 h/ e8 p if lan=1 then
9 H9 C; s1 d; f' ^* j+ v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 I" ~: [/ E R& H- ?" ~! X
to_str("in der Andockstation: \"",?.~.name,"\""));- G8 Y0 R& x; w& S6 m
else+ f+ \; ~+ c/ g$ }5 R+ p5 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 D1 d4 J6 \ l" D4 i to_str("in docking station: \"",?.~.name,"\""));
5 l/ f1 m B; e8 X6 b% ^. p end;
6 |1 b) B: I5 h- h6 n7 Y: O' b7 H, g else) b5 a& C4 V" d5 |8 q
@.Destination := assignLObj[1,row];
. S% T5 B- m- q+ E& q end; 5 j8 P( z$ }5 z, A
newDirection(@);
$ o: B; X1 q& b" r4 `3 F @.HasOrder := true;( x" F5 c. [! n$ E0 K/ g" r
end;: x; B' p( t) } j% U
end;
1 b. B* s8 o7 _2 K7 b! v8 gend; -- of the method8 f6 j7 n, p4 T$ t
|