/* called by: entrance ctrl of the object 'track'
$ B7 i# p) I5 W) P: A l*/
- a) _! o, ]4 }is
& r" S4 c; m P; S( f part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ @! x9 t- x* S( E
do
4 S' s w' p4 P. E/ q) j Lan := rootfolder.Internal.Tools.AOLlanguage;
A6 p) C* |, J; v- G# \ if current = @.Destination -- else return
4 A \! q( z, K1 }6 n4 E7 ^- ~ then9 b6 d3 |: _& O8 [% w4 Z* {
@.Destination := void;
4 O2 r, K8 H |+ I if @.occupied then: }: ^& W/ l5 I5 ^+ A ^: J
part := @.cont;& H S2 K0 A- }
@.transpOrder := void;
) _, @! H2 i/ g: U2 x/ E8 B6 h8 d# D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 V( k/ Z3 B! y: V& z/ h' c/ l
@,root.eventcontroller.simTime);9 a" c3 E. [9 Y8 Y7 G1 ^8 Q
@.HasOrder := false;
- n$ Q& R) S: V; W) ~ @.DrivingHome := true;
. F8 h* q" g I: U Q8 V* }9 B1 _ rgManager.tryToStartTransOrder;& h" g3 x' y8 I8 d+ d8 V4 G, z
if @.Destination = void
' Z/ B) q* ^' O4 \1 o+ } then -- no transport order for vehicle @
2 V3 C( k1 n* h5 d4 n7 U/ b @.Destination :=( `& _" @+ H/ }7 r. F
rgManager.nearestFreeStation(@,track.~);
! x( g6 L. t6 F2 M0 r* ] newDirection(@);
: z1 d1 V0 n/ J/ U n8 n if @.Destination /= void then' l3 C1 \7 T( R" K: @0 ^9 o; m
@.Destination.NumReservation :=
1 P4 f4 l* p; J5 P @.Destination.NumReservation + 1;0 r3 C! `6 M8 i, p" c
end;
: g. l0 [3 B6 \2 C" d @.CurrIcon := "drivingHome";# n: |; D5 d) C5 w; Z0 B6 S
@.DrivingHome := true;
4 y- _, V9 z/ s end;! W- i" ?4 x' y1 Y4 l. W/ {: q1 l: t+ M9 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ _/ U/ c- `1 [+ I. G! y X part := @.transpOrder;
" E. t; {0 I/ v) A. B7 ?* v part.move(@);-- load part% n7 U B6 _" ?( x' s' H
@.CurrIcon := "load";, P$ o7 F3 X! o; ?. r" |4 x' Z
GlobalDistObj := part.globDestination;
" p" G! ]7 Z$ W1 r5 S$ r$ P% ` assignLObj := rgmanager.rgAssignL;
9 Y g* g7 B4 S3 M row := assignLObj.getRowNo(GlobalDistObj);
; E% Z7 r" s6 o E2 n6 m$ A! k6 G if Row = -1 then -- since 70# T; C6 r4 ^2 `0 j
if lan=1 then
R+ u1 K- I6 W! @* ~6 G$ T+ U, n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 p* R$ a4 z8 ^2 u1 ?0 J
to_str("in der Andockstation: \"",?.~.name,"\""));
6 P) K, z/ n. R2 A3 B6 J( | else% l& P1 B9 r: Q! ~/ A/ c5 N3 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; \, l/ n- n+ b0 v2 q% t to_str("in docking station: \"",?.~.name,"\"")); ! Y& ~4 e3 @9 s0 U: _- w) ~" U
end;) `5 q d7 J4 j, l
else
- J8 S# J/ }; a$ F) } @.Destination := assignLObj[1,row];
/ R4 V O; L$ W5 r3 {7 d3 ?- Y) A" D end;
0 @2 E. p8 L6 d m/ V$ @7 W+ ^8 q newDirection(@);
/ v% J5 P2 e) Q5 B+ |: j @.HasOrder := true;
3 w8 }# v" d. S end;4 j' k- p$ a8 n' s7 E6 m2 U/ @ B
end;! t/ q2 D& j9 A; C; R; }; W
end; -- of the method
5 Y& i4 i2 f( `' F |