/* called by: entrance ctrl of the object 'track'1 Z- W: T- O/ b/ I+ {
*/
- Y7 b( Z$ R9 D) o( V$ _is
) Z+ J* t0 j- j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. V$ z% Q/ t5 z% `do
$ X/ `3 W; a! d* d K Lan := rootfolder.Internal.Tools.AOLlanguage;, i* B- M4 k T
if current = @.Destination -- else return0 r3 l" f% I% F! n% b
then
5 k3 v) v" \- E* {* V. ^) R# x @.Destination := void;4 d2 x3 `6 E \+ W7 `
if @.occupied then$ C u$ v9 w/ a3 @+ T
part := @.cont;
! b9 S* m3 S6 A- d* E9 ~$ B/ m @.transpOrder := void;/ R4 }! ^+ N7 E/ B/ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
O/ }4 S* l, C0 j0 W& }7 m @,root.eventcontroller.simTime);# v5 R$ G/ ^6 B- @& S+ w; E
@.HasOrder := false;9 i$ P( l: T% @2 z
@.DrivingHome := true;
! I) V& S" Z7 g5 l, G) u rgManager.tryToStartTransOrder;
( r$ C' N# G2 T9 R% k if @.Destination = void
! r" \6 @- g. H: F h8 Z4 G- N0 X# M then -- no transport order for vehicle @
/ ]/ [) a! r. ~$ g( T7 w0 t @.Destination :=4 ?* t# I9 j/ c: X2 q2 Z5 [
rgManager.nearestFreeStation(@,track.~);
: @8 s+ `1 g9 @1 F/ E newDirection(@);
0 ~4 M: m: z8 Y if @.Destination /= void then
$ _ a' \) l: \$ I) A( f# n w% w0 u- ] @.Destination.NumReservation :=( L% ^% P6 Y3 ?0 F! j
@.Destination.NumReservation + 1;
: ?5 _0 n" P- Q5 T* E end;0 J/ P6 S7 S4 i- G8 @9 g
@.CurrIcon := "drivingHome";7 L) A! e; u3 H; T% A
@.DrivingHome := true;/ ]: p. n! w6 z; W: I5 C9 @
end;
1 S1 k+ n% o! @% v else -- the vehicle @ is empty, both vehicle and part are in the same dock station" P+ ]. S* ?4 X) U% X' ?
part := @.transpOrder;
$ c& R! d6 M2 r, r1 E part.move(@);-- load part+ o; `1 M7 L. d! U9 p1 R: C( D
@.CurrIcon := "load";" O" u0 v4 N2 ^
GlobalDistObj := part.globDestination;" r3 e5 y" m3 Q7 ?; y
assignLObj := rgmanager.rgAssignL;
e5 |3 l7 i2 W* N row := assignLObj.getRowNo(GlobalDistObj);+ J# F% f) O" Z. m% \+ J6 \
if Row = -1 then -- since 708 P, C8 R! ~& b- C5 `
if lan=1 then
# U7 r+ ]& |* D7 U' n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 y: U$ ?, e4 A/ d
to_str("in der Andockstation: \"",?.~.name,"\""));4 f- D) I$ Q. P6 D! u6 l6 n/ y# B
else3 l5 d+ B" X+ e* {" L! A. a! ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% O) C; O5 V ~ to_str("in docking station: \"",?.~.name,"\""));
4 I- a8 i/ w$ H+ {- W4 u end;
* l0 C* T. E9 Q( f$ H else
) o9 Q Y+ C2 T0 J* _; @ @.Destination := assignLObj[1,row]; y1 l. u& g& p4 [: }
end;
% r9 i& M: ^& P8 i- O3 ^ newDirection(@);
# O6 |1 ~' \% i! I8 s0 y% {0 j @.HasOrder := true;1 b G7 [7 B8 m4 l7 P
end;
, n2 O( b+ Z9 l2 f1 T1 V0 Y/ t7 M end;1 l/ a4 o+ C8 Q, l' K- _6 R( G
end; -- of the method N. h: ~4 n+ \6 Z' |$ T
|