/* called by: entrance ctrl of the object 'track'& u! W6 o; a. u$ L5 |1 t9 ^
*/
& v% m) K1 K; Z' M; Ais
1 o& E/ j- z# Y, O4 Z( s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. D6 {* I1 ?$ S/ i! H6 Mdo" r/ v. g% P+ |9 V6 d4 P
Lan := rootfolder.Internal.Tools.AOLlanguage;) I7 p' R3 ]. h% F# I$ j& E
if current = @.Destination -- else return
2 b. e% t! k: ~% x$ `, U then
3 ?, t4 f$ u i% J @.Destination := void;
# I! I4 g1 S- } G, Z1 L if @.occupied then( q# E4 J1 j& G/ |6 x5 J& W
part := @.cont;9 e x, s# w1 B" ?2 p6 Z
@.transpOrder := void;
5 g0 ]& D8 w4 v- X x0 t# E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 G& `" l: h9 C0 F1 O5 b6 @% M, _
@,root.eventcontroller.simTime);4 ]( M$ `, _5 g5 C- T2 K; t2 C
@.HasOrder := false;( S: P! Y( |# B' J8 T+ I+ h
@.DrivingHome := true;8 \, z& K$ m% `6 W7 @
rgManager.tryToStartTransOrder;; d c, i; x2 ]9 ]/ h7 z6 \8 s; I
if @.Destination = void1 C" |. \+ w+ x
then -- no transport order for vehicle @4 @- q+ S i w7 N- O
@.Destination :=* `! U z# x/ [9 U# E! n
rgManager.nearestFreeStation(@,track.~);3 d" a# a( M/ u- h6 S+ R: G
newDirection(@); ( z5 O: u- Z; }1 U! D( t& r0 n
if @.Destination /= void then
( R) a3 A1 }6 v! ^% N2 [ @.Destination.NumReservation :=
3 n2 Y# F8 Q% d1 _8 x* J. r! D. [ @.Destination.NumReservation + 1;
; W3 g- Q8 }, ~% f, B/ {5 O1 t( v$ { end;
6 |* @( ]5 P% A4 n! U @.CurrIcon := "drivingHome";
$ ]% U: j4 F# h) i8 e0 w @.DrivingHome := true;+ M2 z; O! j6 c! f9 N2 g
end;. ]0 o" S7 x2 u5 C7 t1 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 Z3 H0 d# S2 ^) r
part := @.transpOrder; K- r; I2 J( s: [
part.move(@);-- load part
. ]4 C' u6 ^1 D @.CurrIcon := "load";9 {4 Q! `( f: u1 j
GlobalDistObj := part.globDestination;
; O1 j: G$ G, K: B" p) H assignLObj := rgmanager.rgAssignL;: I2 S8 [' s' t' B6 p2 h8 e! L
row := assignLObj.getRowNo(GlobalDistObj);/ B+ P7 l* z5 D _/ b$ K3 B- U& G- {2 |
if Row = -1 then -- since 70/ G+ C. z% F. j$ d' K* L: d$ ?% c2 o
if lan=1 then k. N E4 [ a$ g8 G2 |- `6 i$ w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 n6 G" S$ I4 W, x; O4 {" } to_str("in der Andockstation: \"",?.~.name,"\""));* `7 S$ k. @7 R! a4 W! q% e! D( m
else
9 A' ?$ G$ G! u# g' x3 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ [* n! [, P/ ]$ _ to_str("in docking station: \"",?.~.name,"\"")); 7 J8 I$ t) @1 D; F
end;- e A; R0 k/ ], u# i5 v
else6 y! j) ~/ p- E- b, V4 W) ~8 i
@.Destination := assignLObj[1,row];
5 S3 D! [7 }/ G8 d- m# ^ end; 3 ^: @) R) e" s7 q, P( u
newDirection(@);
$ E1 G7 [) [2 G @.HasOrder := true;
0 o' S, u1 V+ F4 R1 C g end;
D) J. R8 f R! I- f end;
" g* D0 Q/ @' t4 O7 oend; -- of the method/ `( C6 K( P$ o# ?9 b
|