/* called by: entrance ctrl of the object 'track'
. s3 m5 g- L2 ~*/
1 h7 j/ w3 }9 ~is& b- c) K' z3 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 S+ K. w9 g+ a3 g9 T( K `do
4 x# \: X5 b4 D$ b3 V8 r Lan := rootfolder.Internal.Tools.AOLlanguage;6 s9 c+ j: j9 Y* A; y+ T! F7 B
if current = @.Destination -- else return9 X _& m& j! y' [" S- S: B( b
then
5 G) I5 F1 u m' X: a @.Destination := void;% `' g0 }. o6 ]
if @.occupied then
9 D' m" ]- I) Y( l part := @.cont;
9 Z* B, Z' B9 M+ b9 q' F @.transpOrder := void;
( g! b, s7 l# F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ n0 u6 i' ?3 }' \* H @,root.eventcontroller.simTime);- _/ [4 G2 F9 Z; J% ~: Z5 Y
@.HasOrder := false;
( i3 A* I5 G b" j @.DrivingHome := true;
; g0 H" p5 l7 H rgManager.tryToStartTransOrder;
6 ^! e3 m8 I% h if @.Destination = void) U9 k0 m1 m1 x/ N
then -- no transport order for vehicle @
6 l5 ?3 T- l3 W) }7 |! r @.Destination :=
$ @, c, Z$ J9 r rgManager.nearestFreeStation(@,track.~);
9 F- `* z- O1 t) S# E newDirection(@);
- k& K1 D/ x9 D( ]8 o if @.Destination /= void then: U2 Y! \) @( j: L6 L
@.Destination.NumReservation :=
! Y4 X) o- d! V6 ~+ |$ I @.Destination.NumReservation + 1;0 h5 V7 t/ n+ Z8 E# C& P
end;
; B$ M+ O8 Q) k2 F+ X# R @.CurrIcon := "drivingHome";
+ G# E3 ?) F* `' t( e @.DrivingHome := true;
9 b, M1 p' W, J9 P; E end;0 b; } Y! \4 ]2 Y3 P/ K1 J8 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" E2 h6 O1 h. J: [, h8 t) d3 E part := @.transpOrder;5 C7 ~6 r4 C2 g6 z: y- S
part.move(@);-- load part/ I7 c2 D. @' g
@.CurrIcon := "load";
4 }0 o3 d7 u- w' H6 L GlobalDistObj := part.globDestination;
1 ?8 I$ W# Z% w5 x assignLObj := rgmanager.rgAssignL;& y/ t$ ~! ]: |9 y! B- J2 V9 R0 ?) t3 k
row := assignLObj.getRowNo(GlobalDistObj);
, t4 y C: n3 S* E" t& m& m if Row = -1 then -- since 70
3 d: W' n" {$ |4 G if lan=1 then2 p4 h1 _9 d7 e" B- R; Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 u. ]0 {; n( Q% P; l
to_str("in der Andockstation: \"",?.~.name,"\""));
9 Q& h S. C ]5 A7 r else& U5 q0 F( E% D5 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) d& R" e' ~4 x+ D6 J- s' g7 r to_str("in docking station: \"",?.~.name,"\"")); # C: G) ]4 M5 h7 D- @- y
end;
" }* X! r! h; X3 l else4 f T6 h0 k4 ^' o4 X
@.Destination := assignLObj[1,row];
4 \& S- P- B4 W8 @ end;
& I2 y/ Z/ x# K+ n u newDirection(@);, U7 S8 Z# C9 r/ u1 M1 [
@.HasOrder := true;) @4 m6 M v, M5 H9 k* j. v
end;
! ]% b, i; A) @9 s7 y) g end;
" n" D2 d0 [' Hend; -- of the method
) W/ l7 ?! r6 g+ z0 r) O5 ?: { |