/* called by: entrance ctrl of the object 'track'1 p- M; q( u7 t& S5 j! `
*/) z/ u& P3 |3 \, U+ I
is# v$ J! a5 Q: { A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. V" {5 {6 ~ Xdo8 A( h9 J g$ ]3 \- B/ ^/ Z9 R6 w
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 g M1 o8 [8 u. K! N if current = @.Destination -- else return
5 `2 t! l% [6 _4 ?" e: v6 { then
' n% h7 T r* X @.Destination := void;
3 V, w1 x. J6 L6 F, f if @.occupied then
" E% A# u& q; a- n# w I$ z- V part := @.cont;
& a. v) E6 e% L9 ~$ p) j" ] @.transpOrder := void;6 i. @4 Z4 }1 P: W8 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 D, J) a8 D0 a. b7 Q2 @7 p* ?
@,root.eventcontroller.simTime);
8 T T; Z% O" p8 H6 j% r, {) d @.HasOrder := false;
3 d( O0 V( K+ O; y4 n. ^" G h) t @.DrivingHome := true;7 M" z7 b7 l# Q+ b% A
rgManager.tryToStartTransOrder;4 ? Q9 l) t2 o4 v1 f0 G. h( F4 D
if @.Destination = void
6 E& [$ u' y6 D; v/ M* h then -- no transport order for vehicle @
& ]' _2 O1 t7 N1 V @.Destination :=) E' [5 `8 D+ {( u% M
rgManager.nearestFreeStation(@,track.~);
# M0 ?. ?- Q8 w3 m0 w+ _( e newDirection(@); ( ] }: `1 ]' ~: _: I
if @.Destination /= void then2 S' @# v) U" u2 j) y0 Z
@.Destination.NumReservation :=- s* k b. N1 U; K5 k. p9 m1 x
@.Destination.NumReservation + 1; }9 ~8 @3 y, t/ U+ |, L
end;! B) B) F$ Z2 c$ r
@.CurrIcon := "drivingHome";: d. c9 |7 \. _' n3 Z" U
@.DrivingHome := true;
4 p. W4 o0 S, F end;
* a6 P5 U6 ~$ H& g3 F a4 x' V4 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station( c& G( ]2 X9 b# T. E
part := @.transpOrder;
+ p5 \0 I* @& b5 _" Y t" h part.move(@);-- load part- z* k V( N9 p. H. _7 M; G
@.CurrIcon := "load";; \# b. F# q u9 r5 e% R# |
GlobalDistObj := part.globDestination;
* U8 {8 s0 v5 t. w6 C assignLObj := rgmanager.rgAssignL;
$ n8 Z' x8 _4 _9 ?. r3 p* S row := assignLObj.getRowNo(GlobalDistObj);
2 |; G3 {+ W$ ~0 N% F w if Row = -1 then -- since 70# A& R! g1 D3 \1 q
if lan=1 then* U% D9 L0 W& O2 @) T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& H( m( ^ k; g* Q: K
to_str("in der Andockstation: \"",?.~.name,"\""));7 Z9 t0 N/ U3 F
else
; }+ o1 J+ E4 B3 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) u8 L' D; t) U& ]" ~& D. |
to_str("in docking station: \"",?.~.name,"\"")); 2 n- k2 c) E- t
end;
, F* o4 E( c+ [1 Q0 q: V6 M) L else
9 F! C, S- B- o) J1 c1 U @.Destination := assignLObj[1,row];6 n2 C) l" c3 n; \$ f8 R( S
end; & h- @: U" Z; X5 C1 M5 \" Y
newDirection(@);
* ^/ I. r2 \) L# o! Q @.HasOrder := true;5 o+ p6 m4 G" |2 S' w0 f# h
end;
$ v: ~6 b' W& A( F# b. V+ N end;- x3 r- ~+ H! q$ O" Z. h3 j( ]
end; -- of the method2 ]7 W$ M) W: W
|