/* called by: entrance ctrl of the object 'track'
! O; ^" L5 t$ T+ s2 z6 R! |+ t*/* A: ]2 R" S" Q% x' j" g
is
i+ n( B3 X5 V! A+ y( K* F7 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
H: w1 B" |0 Fdo- d B, F1 X$ `3 ^: H
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ `6 E* ` c% J( `) E" R% I- h; ] if current = @.Destination -- else return
0 _. r4 ` }) {+ ] then1 {& a, l7 Y% ~3 m% Z) H0 Y* M
@.Destination := void;5 Y/ _: ~. F4 t: [
if @.occupied then
+ S9 e+ ~4 ]) D& f. o9 _9 T$ S8 j part := @.cont;% T' {) A- k- Z
@.transpOrder := void;
& D' K, G9 M: S4 R7 ~6 T0 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 P) \0 P/ I1 k1 s, A6 Q- y& b
@,root.eventcontroller.simTime);
" A6 |, ` a: S0 B1 y @.HasOrder := false;
( d* A7 F. M3 f w @.DrivingHome := true;
+ D) Z6 U- L+ w% M rgManager.tryToStartTransOrder;
. }5 V7 `8 J* p( h) o9 ~$ B if @.Destination = void1 i+ p1 v4 r; C9 z, e5 F
then -- no transport order for vehicle @, O" x% |! F3 t( B5 R" @
@.Destination :=
, Q0 ^# }' D& A9 I( N; s" Z rgManager.nearestFreeStation(@,track.~);6 t2 d7 ?1 X5 T) H: Q
newDirection(@); $ e. J- z9 m# n, e2 A- c, Q
if @.Destination /= void then l7 x4 q1 g) o2 A- I4 ]0 p* v8 H
@.Destination.NumReservation :=5 M) O* m4 s' L" v# D) |& Q
@.Destination.NumReservation + 1;% g2 d7 W7 U* W4 B# |
end;& i( b3 W2 M; H/ P e9 b- ]0 M
@.CurrIcon := "drivingHome";
: z6 G! F8 u' P+ } @.DrivingHome := true;/ g$ S2 ?: F/ `( E ~1 N& d& X: D
end;% K s" N/ W; R }3 R5 P T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" i6 y, L( e2 x8 ~2 ?
part := @.transpOrder;
$ Y0 a3 L4 k1 U# J4 i- j5 I2 y( q part.move(@);-- load part
5 ^ D& a3 q/ y8 A8 O8 Y6 b4 w; a @.CurrIcon := "load";, p. d/ K2 ~* {5 u2 J/ X" W9 G
GlobalDistObj := part.globDestination;6 M' D7 T7 m) ~5 z" a- f! w
assignLObj := rgmanager.rgAssignL;
r4 k0 H' W7 m4 t7 N; B6 j row := assignLObj.getRowNo(GlobalDistObj);
7 V# y& T: U/ M. f% [% q if Row = -1 then -- since 70
5 M3 T2 f7 y5 i9 { if lan=1 then- h5 W. H* {* u" q3 J* x: a$ g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S9 P6 i1 G* T. {% r
to_str("in der Andockstation: \"",?.~.name,"\""));6 Z2 l4 v. `: d6 J8 p9 f" Q
else/ g. t7 {& i. M5 V; C/ ^2 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) W8 ?$ s" J3 f to_str("in docking station: \"",?.~.name,"\"")); ! q8 E; v* Q* A4 b/ V
end;
; S1 Z! z+ w0 R, o9 x8 e: B else
; d; ? I: V+ k @.Destination := assignLObj[1,row];
1 Y+ @6 W4 F8 z$ Z( o' Q end;
( j& @4 @ c% l: e3 b: L. g6 L! P newDirection(@);7 N3 m( \# S& Z$ w8 E& ?8 t4 E
@.HasOrder := true;" i4 f4 y! `& ]
end;
- F) _$ T8 T9 V6 w% H* f end;) u6 K5 R( u2 {* u
end; -- of the method( C0 B) s, E2 q
|