/* called by: entrance ctrl of the object 'track'
/ g( @0 c, Z: W*/. r( N* J1 ~5 D4 q
is7 _* s3 q: x3 X& J( `8 V6 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 ~, Z; @5 z3 V% p1 {
do8 Z* f$ \. A& @6 S, ^ j
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 P, t: q3 \7 @0 z2 k( T% | if current = @.Destination -- else return
2 {( T% C/ a4 S' K. f then
6 W) Y0 g& b) ^) N. b1 t; P& k* S @.Destination := void;8 M8 o: E6 x! ]. `# Q
if @.occupied then1 V* ^" D+ E# P! \2 m
part := @.cont;$ e9 B* M% ]- n- v3 L
@.transpOrder := void;
/ C6 L3 R5 H. E! |; j7 B6 n* s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% y8 @, f8 a; @2 e ~ @,root.eventcontroller.simTime);+ I& k# K$ g/ \. E: V; j- `$ r4 I4 M
@.HasOrder := false;
4 p6 x0 Y' m+ f8 |. h" V7 d @.DrivingHome := true;0 u# x5 z ~8 Q. G
rgManager.tryToStartTransOrder;
; M6 `% h) ` s5 o if @.Destination = void
# c% S6 N9 m# L+ t* W then -- no transport order for vehicle @
" x7 c$ M2 v( f- q" }5 w+ J# M* E9 ~3 O @.Destination :=+ ?) ~/ U, V! g: j4 m4 ]. e
rgManager.nearestFreeStation(@,track.~);
2 p1 }( J) V2 @2 @' ]" K7 L newDirection(@);
, ~: ~3 h# i' Z: @6 Y% g if @.Destination /= void then- U: w6 I* S5 t6 v/ \/ t0 `
@.Destination.NumReservation :=
% g6 r7 K2 g% b7 Q0 J) H @.Destination.NumReservation + 1;$ t& B" Q# U1 m: {: w
end;
' R( L$ N% D" q4 ] @.CurrIcon := "drivingHome";
" W M0 n8 ?! ^4 X1 F; g @.DrivingHome := true;
8 |/ u8 D/ R3 k end;# f- t4 n; _7 f2 }# g0 }: o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ l+ k* @7 `8 q$ J) K5 A: N4 w% g, R
part := @.transpOrder;
1 D1 L& Y/ m5 H' ^4 x6 V4 N% T4 ]4 s part.move(@);-- load part
1 O% }3 |4 w! W b. n- o @.CurrIcon := "load";% y+ K) Z6 D. o, B3 e8 U: E
GlobalDistObj := part.globDestination;4 U; ]! ?' o- }) T" e! {
assignLObj := rgmanager.rgAssignL;5 A2 D9 u9 h: ~3 g+ G$ V
row := assignLObj.getRowNo(GlobalDistObj); [1 r) I) g, `; w( N# E) S
if Row = -1 then -- since 70
+ N( D* C/ E, V q. g if lan=1 then) O g) Z0 i/ [. ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; |7 N& d0 G1 ?5 m0 Q) S to_str("in der Andockstation: \"",?.~.name,"\""));6 a: r; j/ T& Q( a! N
else/ m: C) ~1 E" x7 _0 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 u% n! h" K) {- `* I& r# M3 k
to_str("in docking station: \"",?.~.name,"\"")); / h% Y4 [$ i% e! A* G* Q5 Q: M2 ?
end;9 Z! B* r8 b4 i9 @9 l' g/ y
else* ~9 N5 ^0 X/ t
@.Destination := assignLObj[1,row];
! j7 A0 q8 V0 O; q end;
9 B2 ~1 m# G: K H1 I2 ^; @ newDirection(@);
& ?: ? @0 B# R- v @.HasOrder := true;* y* f1 R! R! H7 \1 {
end;5 L8 t' f1 l! I8 k" Y
end;, i G" F' B. Q% \ j
end; -- of the method
^7 ]$ w! E6 w& Q8 R |