/* called by: entrance ctrl of the object 'track'
( ~* B( N6 }' v*/
* f' Q& ?9 n7 L. p7 ^7 i, Pis
?/ R$ t8 P; C! V0 K/ ~6 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! E( R9 q0 i7 v4 @" T, {do) A( \, {4 t7 E9 ]8 c, G
Lan := rootfolder.Internal.Tools.AOLlanguage;5 R4 g/ p( w% R/ \2 N8 Z. k2 }
if current = @.Destination -- else return
7 _) O* Z9 u) d8 B! r' B. Z then; S2 f" T$ a: |3 s8 Q) Z# r
@.Destination := void;, a+ |- T; I; D9 S( t5 P/ X( [
if @.occupied then- s# P4 S7 i$ n5 Q E
part := @.cont; {% ~+ H5 O k: G" w* B7 s
@.transpOrder := void;
& v) i; ?+ `% t- G+ Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) O8 C7 F2 t) A2 n$ g) Y
@,root.eventcontroller.simTime);+ ?& U7 n/ _8 G% v. Z5 E7 {
@.HasOrder := false;; u' P& S% A. T, ?! G; V' p
@.DrivingHome := true;: `; q) a, y$ v& q0 y- V0 T' X5 n/ F
rgManager.tryToStartTransOrder;: E* `6 @2 a2 {6 ?. t A
if @.Destination = void
4 ?$ M- N0 D! f: z4 z+ L9 [9 \ then -- no transport order for vehicle @
/ l* d9 i6 L) n& E9 a& q, r @.Destination :=
- z% A" T7 C+ Y+ a- j& ` rgManager.nearestFreeStation(@,track.~);# l" l6 |2 x' h% t" L1 f
newDirection(@); $ J" b0 E! a7 J! v/ X& R2 k
if @.Destination /= void then
; o; q: y% m$ Q/ Q9 N# N @.Destination.NumReservation :=
- F/ A5 Q" j. U# u7 z @.Destination.NumReservation + 1;
4 }+ \( i; Q( V! C end;
7 r+ j7 Q b8 c0 Q# X @.CurrIcon := "drivingHome";
4 m1 Y4 A8 B2 P: Y% @8 a9 U; h @.DrivingHome := true;9 [; Z$ ~+ R( B. U' [0 m
end;
" n0 M$ _6 X6 y: E. j* Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station* o4 h% [8 Q2 x, W
part := @.transpOrder;
6 A! `/ h `+ g% h7 Q' ?2 n, c part.move(@);-- load part2 d" N: B1 e% R( @1 ?
@.CurrIcon := "load";
" Z) _* B; W$ w! \+ r GlobalDistObj := part.globDestination; {' X% ?0 R( }5 p" R8 M+ u& j
assignLObj := rgmanager.rgAssignL;
% ~- k G$ Q4 B) K+ U* x0 u row := assignLObj.getRowNo(GlobalDistObj);
' L5 M) ^- X+ C: H; a if Row = -1 then -- since 70! z2 e' g \1 P: j
if lan=1 then* ^. ]* F/ d: p5 \* q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 J( C M5 i- i8 ]2 @1 w
to_str("in der Andockstation: \"",?.~.name,"\""));
8 R( ?0 m$ c5 ]! h, R; D2 i; O else9 O* N! A J' N6 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: r! i! f2 z0 Z9 J4 l
to_str("in docking station: \"",?.~.name,"\"")); % B1 j' x3 |6 J( }! [ `+ U
end;4 {7 f. `5 S/ T4 X1 z
else
: T5 W- S A4 C' p @.Destination := assignLObj[1,row];0 ?* z6 P( ~( D1 B7 [' i9 p5 T$ Y
end;
* t+ h! P1 D7 g9 Z0 y$ t newDirection(@);" X! i% p8 u& `! r: H
@.HasOrder := true;1 f5 {6 z8 g) ^4 \8 u
end;
: X) R" }, f) t- X. Q4 x3 X# g$ x3 B end;- B8 o0 J# }$ [1 Z, w: c
end; -- of the method' p5 U2 |# R' N
|