/* called by: entrance ctrl of the object 'track'
. w- k! a: X8 I9 T# K/ q*/9 p/ |( M- z5 [+ r( g0 d8 O
is' ^, P2 W! ~/ f! J! u, y/ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; | O i B3 v
do6 b, v8 g3 L7 A8 V4 G
Lan := rootfolder.Internal.Tools.AOLlanguage;
) {, [: n1 I0 |9 t if current = @.Destination -- else return
2 C0 }# f8 C; U then `) m, J% ^2 j; w5 @0 W
@.Destination := void;% a) g, i2 {4 l) q% j: e$ |# G9 d# J$ I
if @.occupied then) Y9 ]& k; d; j6 z! O* T
part := @.cont;+ d7 o. O4 `1 z
@.transpOrder := void;
$ k' H' \4 K8 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 B# Z4 ?1 p( ~3 p: |- l
@,root.eventcontroller.simTime);
- M& l. M t7 V" o @.HasOrder := false;. R" O% n& ?5 ^# Y
@.DrivingHome := true;6 [5 D% n4 Y" b* X% c
rgManager.tryToStartTransOrder;2 h* c/ r. x# @- C `* a) ]
if @.Destination = void) i9 k X2 O0 ~: X
then -- no transport order for vehicle @
" Q5 i; q, J$ x5 X @.Destination :=# a+ ^, N% U( g; t+ `/ Y
rgManager.nearestFreeStation(@,track.~);
0 O3 ^& p: A7 \/ p2 u* }5 T newDirection(@); 7 f; o* |; m0 e9 X
if @.Destination /= void then1 ]3 k5 S% e+ E5 v3 x
@.Destination.NumReservation :=
4 \+ ~& n. O0 J9 i6 P& a. r @.Destination.NumReservation + 1;
; f0 Z' E. o7 T9 l1 h end;) {4 G8 V# n- O9 Q& L: u/ g- v
@.CurrIcon := "drivingHome";1 `1 k0 Y4 H% z* O* q
@.DrivingHome := true;
% ]* B$ d. G2 C3 d: z% O end;3 v' ~2 \( E3 k* r8 n5 y( u. U- O/ w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( A1 h) C/ `* M: l+ H part := @.transpOrder;
3 b+ Y4 P+ ]0 T) W9 `" v ~ part.move(@);-- load part
; L, [- ^+ r" O( \2 |/ L; } @.CurrIcon := "load";
7 |! b# O3 {: |/ c- \' d* f GlobalDistObj := part.globDestination;! l# D" U$ }7 b9 Z2 M5 G) u5 w- S
assignLObj := rgmanager.rgAssignL;( x3 g0 m& R! `2 d. _+ J4 i
row := assignLObj.getRowNo(GlobalDistObj);
1 z) i* l9 y1 h m& L+ F9 G if Row = -1 then -- since 70
+ I- p. A2 s* v if lan=1 then
/ J h; ]' \& @: ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 e8 @$ c; b$ m( \5 N* F9 Q to_str("in der Andockstation: \"",?.~.name,"\""));
0 S+ b# _" T. y. Q O' J6 X. F else
2 E0 n& a8 F) B, d; P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) R1 W4 g, g+ F( T' m) Z9 ~ to_str("in docking station: \"",?.~.name,"\"")); 6 T) m& V; }" z! D) p# ^3 v
end;
% N7 }+ _! W! s: Q else
3 r& t% [4 J5 n3 c @.Destination := assignLObj[1,row];3 N, e; |; I! B: f4 j4 q' H1 H, y: A5 J& K
end;
& F, Y9 L$ z2 b5 f; J newDirection(@);
( `8 V( u. B) _" @1 Q. f$ ]% x @.HasOrder := true;8 E, `2 O% D8 T1 A. _) y
end;
1 W2 p# I6 E- p end;- Y9 O X; K6 j$ Q) t
end; -- of the method
5 i% f7 _- z1 X- Z2 s |