/* called by: entrance ctrl of the object 'track'& E7 @5 ^' N$ I4 [) A- G# e
*/. P" D2 r6 h" g+ k, w; m
is
5 b) D% `: {. C3 N. M part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 o! l5 C) }7 L3 X9 t
do
4 z- }7 j' _) k( v2 w! m! q Lan := rootfolder.Internal.Tools.AOLlanguage;3 o* i! } Y$ Y) X, ~6 ]
if current = @.Destination -- else return
* f6 v( n" L! U6 t$ n3 d" | then) J4 Z4 ]2 f$ b, @+ a; r" X
@.Destination := void;
" ?/ T1 f& ?& H% y3 a if @.occupied then# P$ E. x3 A6 v e0 N2 b
part := @.cont;2 z; M7 V: g9 K# k
@.transpOrder := void;) k& I9 ^1 B; i' @1 G9 E, U5 B3 Z8 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ M+ t# F) {4 g/ V @,root.eventcontroller.simTime);0 A( ^- C9 a# M' u. w
@.HasOrder := false;
. P$ R# o& t; Z7 M& m ~ @.DrivingHome := true;1 g6 A3 a$ r% X4 _; W' V1 C
rgManager.tryToStartTransOrder;" ?$ C! I& H8 F% {( f4 T6 R
if @.Destination = void
2 m Y! X8 s) ^- y then -- no transport order for vehicle @
4 ]4 V, ]7 a1 B7 S3 } @.Destination :=
$ D% v0 e8 v) b" D rgManager.nearestFreeStation(@,track.~);0 |" r6 H- x" j' d) G# N# G! L% c: ]
newDirection(@);
, a* \# Q% v) N+ ] if @.Destination /= void then- w* ?3 S3 h; [( V/ w1 x
@.Destination.NumReservation :=
. ?5 \' g2 \& s) X3 }' M' J4 h @.Destination.NumReservation + 1;; \$ p# V8 B( R3 i' Z! x
end;) W9 a5 W# a) `8 ?1 }
@.CurrIcon := "drivingHome";
" G+ U u& ?/ k8 S6 O9 D3 c @.DrivingHome := true;) H0 c3 N6 R& G8 `' d! i: D& m& A
end;) t/ I! v0 f% ]2 N6 \, j8 F; Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* |1 ~: v% C8 n% O part := @.transpOrder;
; @/ A1 E" S- @, G9 b$ @ part.move(@);-- load part
# W3 L, F4 S' b* P9 V @.CurrIcon := "load";
6 L( U, v! }' u9 X! ?9 W GlobalDistObj := part.globDestination;; _( d, ?$ L8 ?( \( F- X i$ D
assignLObj := rgmanager.rgAssignL;3 y( |' ~! C1 N% n
row := assignLObj.getRowNo(GlobalDistObj);: i K! p* f2 n- v
if Row = -1 then -- since 705 U7 m! E" v. C9 k2 a' J" }/ [
if lan=1 then
$ j! t5 B$ B: h2 q6 O3 { [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& i/ T+ `9 k1 N
to_str("in der Andockstation: \"",?.~.name,"\""));
8 e j0 u* k/ o$ l3 u else
9 S+ y+ T& C% Z- X4 t/ V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ D% w7 {" K4 c1 a% F to_str("in docking station: \"",?.~.name,"\"")); . s: O( d- r% i1 @: V$ k# T
end;, h$ P0 Y2 t: \0 f/ I
else F( t8 ]$ O/ [" c; s% G3 s
@.Destination := assignLObj[1,row];! }$ R! A& j. ^7 P' L3 q6 V
end;
" |8 S. f4 S& V, G( x+ W1 I newDirection(@);
8 L- V' F( W- V# W; | @.HasOrder := true;3 g1 a) c' U& \
end;- V. H9 I% B- b k/ O
end;9 F6 e7 {2 C8 Z4 R# i" D
end; -- of the method1 x! z1 M5 g5 @5 _' U
|