/* called by: entrance ctrl of the object 'track'! d T8 l* m# `) x1 P! Z1 K
*/4 T; G' S8 t2 `
is
( K i8 L8 i( M part, GlobalDistObj, assignLObj:object;row,Lan:integer;% \& V% @2 J, q4 c; `4 v
do
; j3 m% I8 e1 e% ] Lan := rootfolder.Internal.Tools.AOLlanguage;! h P4 J2 w( q2 ?4 u2 `2 t
if current = @.Destination -- else return
/ l$ p# J% O u* ~; g/ u. i/ s3 g6 L then1 m( g& X% |3 f) o0 ~
@.Destination := void;( v. z/ l1 g0 z* `' u1 B! A. F+ k
if @.occupied then; W6 J& \9 P4 |9 ^, L# {4 Y( P& u
part := @.cont;
3 U) @) k( I/ \2 U) O# l3 h @.transpOrder := void;
! {: c, v7 [& ]# k: R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- c* } M1 w1 a0 G# H. X7 | @,root.eventcontroller.simTime);
# c( Y3 g2 @2 | @.HasOrder := false;
3 }$ b- o% o2 h3 g/ r @.DrivingHome := true;
1 C z# v( t! g% K' k0 v. ~7 [" W rgManager.tryToStartTransOrder;- K; Z+ u: _9 ]
if @.Destination = void
2 S& ?5 u( m t then -- no transport order for vehicle @8 p# P2 b6 K" k# c% J3 _8 I
@.Destination :=
$ z* |1 T+ L0 U7 |' o% t- V( w6 K rgManager.nearestFreeStation(@,track.~);
* f( x4 \& _7 ^, S, l newDirection(@);
( b4 x1 B% W9 a( m! C, L! X if @.Destination /= void then9 b4 \4 d; r( _+ |- t: m
@.Destination.NumReservation :=
& ~+ x3 G% |2 B) w+ u& m @.Destination.NumReservation + 1;7 u' D, v" Q) q( n/ e; d& P F
end;3 _: e9 D# Q' w/ `8 v; z: j
@.CurrIcon := "drivingHome";0 a/ @6 e# z* J" E* C" p# e" {# u
@.DrivingHome := true;) f' ]( g" }/ s3 e8 ^
end;2 l4 l1 u7 z* p: }. P }+ d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 b% v9 Q' G1 k/ U6 @5 w3 [0 C: p part := @.transpOrder;+ Z. j6 T$ F# l9 {" \
part.move(@);-- load part& Q0 e/ b2 f- t/ H9 `4 s. w
@.CurrIcon := "load";
+ O% _. J7 Z- k GlobalDistObj := part.globDestination;
: J7 \6 l* f( H0 R# v assignLObj := rgmanager.rgAssignL;0 K T# u$ Z! D6 p8 o" g+ e% C
row := assignLObj.getRowNo(GlobalDistObj);8 ?4 x0 G# M' s7 {. _
if Row = -1 then -- since 705 G4 ~4 p+ I( z7 [/ A8 O* Y5 b
if lan=1 then* r# e5 n% s o. a( l) ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& B8 Q- S8 T1 }3 K6 `2 c to_str("in der Andockstation: \"",?.~.name,"\""));2 x0 M* F' h, O4 `5 q6 |
else
2 \3 F3 \" o$ G5 d2 H% j2 `0 c" A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- m/ e. J5 P( N6 x8 | O( F) m to_str("in docking station: \"",?.~.name,"\""));
8 u& z# t/ {5 b, U5 H7 x end;! I, N) e( N# x, y8 `# W" Q* ]2 |
else
& L/ h' a: }( W) a7 C9 {' P @.Destination := assignLObj[1,row];4 r) p- V. g4 O$ R# c
end;
. X6 D1 v7 {/ ]" A# D newDirection(@);1 i5 E+ K# \* q( L% K: l
@.HasOrder := true;
) ^9 x# u9 e9 N8 [ end;
5 \! ^# g0 v8 W( e end;
/ R) L/ q: ?0 j" E' ~, q! Hend; -- of the method
6 Y4 h6 z. Q( E2 K) y |