/* called by: entrance ctrl of the object 'track'
1 q- V' y6 H1 z+ P! o" F8 j*/+ H& u2 \% D" s; k3 z5 K0 B6 w7 f9 m
is, u$ j% u- Y5 w% p7 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 w7 J& ]/ [/ f; O& jdo2 Z! V% ]# q5 l$ j/ ^: S3 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 P: K& b1 ^# S5 c if current = @.Destination -- else return8 S6 `6 N7 N# O$ W" [
then& b3 g7 P4 l4 ^1 L1 _8 z, i
@.Destination := void;( Y4 `. { o1 R' B
if @.occupied then
$ R i/ H. \! f1 w part := @.cont;
( ^1 w$ F/ b$ M2 j @.transpOrder := void;
% H, X6 A$ t" U) x' y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ I1 i% h. V/ X! j
@,root.eventcontroller.simTime);" i; E& d" D1 o" e- ?8 ]4 N
@.HasOrder := false;
- B$ I; @, s* V; l, }/ x, S @.DrivingHome := true;, n) ]/ t3 N: m' K. U
rgManager.tryToStartTransOrder;( O3 u- Y9 d O9 j, y5 R
if @.Destination = void
0 W0 k5 j+ h! `/ E* O/ q& b' V then -- no transport order for vehicle @
7 F9 U" Z: p- A6 H @.Destination :=0 w3 D; C/ {3 F
rgManager.nearestFreeStation(@,track.~);( H( j- K6 F, ^7 C" w& X/ d6 R
newDirection(@);
) [3 u4 r+ N8 }8 t3 g" |: | if @.Destination /= void then
3 E% f0 W8 Y0 o" o2 q- Y @.Destination.NumReservation :=
7 p0 G! A, o9 j# x @.Destination.NumReservation + 1;
3 F+ _; c, w4 R; m" `* G$ w8 a end;
% V/ s4 b0 z3 G, }; M @.CurrIcon := "drivingHome";+ v+ F. n% a. e* D" ~+ s
@.DrivingHome := true;
% h9 A# s. F- H$ \2 a4 r" S# S end;
; ?4 y* Y6 u* `; u* d5 z else -- the vehicle @ is empty, both vehicle and part are in the same dock station% C) `4 z% E7 [6 a$ @
part := @.transpOrder;
* r6 U8 O& o6 y6 R4 s part.move(@);-- load part
5 {/ B: J/ {3 \& E8 _ @.CurrIcon := "load";
" M2 [/ j+ v" y4 _ G0 D$ _' m GlobalDistObj := part.globDestination;$ k Q2 L7 s, m# _1 f7 b
assignLObj := rgmanager.rgAssignL;% e' ^1 `+ Y9 k- H* D
row := assignLObj.getRowNo(GlobalDistObj);
& W0 _7 x' V3 K if Row = -1 then -- since 70
6 s! L/ @, c x& y' t- r$ i if lan=1 then
" B) ^6 U: I2 E. t4 x4 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ k# J' {: J/ I& C to_str("in der Andockstation: \"",?.~.name,"\""));
! f4 s( ^" k: a9 T: q else8 P+ L7 n' K+ a6 \" m" b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), U; _2 k. h, `' p( u% F Z$ `
to_str("in docking station: \"",?.~.name,"\""));
O" v( G) A0 T0 j( j end;+ B& \5 e. a/ s7 x7 f9 A5 |
else
4 q" r8 S/ A5 A: l4 H# x @.Destination := assignLObj[1,row];0 l& L0 }7 _- ?+ B6 g
end; . l d6 _! y: L8 H+ h; X
newDirection(@);
# c% s* k4 x* C K. [5 p! e @.HasOrder := true;, n4 o D4 b- \
end;! q7 \! E3 K. Z; j
end;& h* g9 \; p" r1 c( @! Y b6 w& b: X
end; -- of the method
" k7 g: X4 e+ d' R! w4 m |