/* called by: entrance ctrl of the object 'track'
/ U0 U7 N! z+ m$ z) g$ F*/
3 M& o/ B/ { e5 y6 Y' Z1 |, His0 p b& W$ `8 }% [) r6 z3 Y; Z. U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 Y; l: D3 M( I2 Z5 \# `4 fdo
, t; {7 a0 t7 @: a Lan := rootfolder.Internal.Tools.AOLlanguage;
& o4 g6 o2 I/ F) }+ k. n if current = @.Destination -- else return- v5 [+ j) w) U/ h0 Z
then0 m% e) Q% [7 P, X% h3 k
@.Destination := void;
# A# V9 v* d* J. k. n2 D if @.occupied then
' c4 Z! C; Z0 a part := @.cont;
% [" l4 p8 c$ j* y' S& m M @.transpOrder := void;
! G6 G. M: `7 Y! x! b9 z% Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* o& }8 ?' l' R; I4 b8 g6 S @,root.eventcontroller.simTime);2 u: i; h8 ^3 \8 q) b) c2 M
@.HasOrder := false;9 L1 O2 P) _9 e7 l0 g7 \2 W3 w
@.DrivingHome := true;" U. n; x! O' u/ A/ d
rgManager.tryToStartTransOrder;
# E0 `7 O8 \% B( F! h& n( O- B0 w if @.Destination = void2 h Q) F# A* f$ q* X8 e! a6 ~
then -- no transport order for vehicle @0 a8 h# C1 f+ T$ l3 k" ?9 `1 v* x
@.Destination :=7 f. H# [& y' q( ?- d% E
rgManager.nearestFreeStation(@,track.~);$ r5 B, b9 U: r b
newDirection(@); " A) N* y: }2 P5 ?2 o
if @.Destination /= void then/ S! u6 v+ I8 x* n \; u
@.Destination.NumReservation :=0 u$ Y0 h8 a2 s) ~# g% ~
@.Destination.NumReservation + 1;
8 V0 x+ r0 a7 r: N3 J2 i+ t end;
0 W) l7 i# c9 ~- {% L# e' ~; K! `' i @.CurrIcon := "drivingHome";% k+ V3 J) w3 v# m# T% r/ R7 u
@.DrivingHome := true;
6 T% M* y7 y1 K; x/ `. s% j end;
2 g6 i' A9 ^# i$ M* `2 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 r4 M- m/ f1 P
part := @.transpOrder;( n. W; a6 x1 `
part.move(@);-- load part: s, k& j. p% t' q
@.CurrIcon := "load";# [) L% q2 ~6 r- t y$ g
GlobalDistObj := part.globDestination;; B- p7 v1 X1 e( }
assignLObj := rgmanager.rgAssignL;
9 B3 D/ W, ^3 e6 I1 Z4 ` row := assignLObj.getRowNo(GlobalDistObj);
" i" s* q' m" I5 D5 h! U' S( A if Row = -1 then -- since 70
5 d& y; p9 G& g3 g1 W9 v if lan=1 then0 z2 w4 p8 w y* ], o3 W) Y8 G" ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( }6 V" |/ W1 z3 g) C7 L to_str("in der Andockstation: \"",?.~.name,"\""));
* J3 M" |% _. G: i# Y. r$ G else; {2 |# F7 S# }! E. A$ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- I! n( Z' }) K" B: Y# f* Y4 }7 C to_str("in docking station: \"",?.~.name,"\"")); $ N( f0 S) Q0 |! u# C
end;9 n/ A' ] o" }+ w
else- I% j+ ~, n8 {* G# ~* @7 q5 j
@.Destination := assignLObj[1,row];
7 d, d4 j1 B) p9 X- T% r G end;
' X+ j. ?4 v; t" i+ r newDirection(@);7 a: i4 i" _/ M& v
@.HasOrder := true;; \9 ^( v" ]; } i
end;
$ M$ Y: w3 m( g3 u: `* D end;. x0 |. o$ b7 g
end; -- of the method' a8 }3 d* x) P8 I
|