/* called by: entrance ctrl of the object 'track', R, h" ~, B$ g
*/% b" q7 I: |3 e$ n2 ^ [
is; H7 y/ i6 F3 i1 {& w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" H, e! A$ ]7 N0 d3 F U
do
4 m! c: n1 a8 e( W; v Lan := rootfolder.Internal.Tools.AOLlanguage;
5 B+ t) ~1 Q6 z6 D$ ] if current = @.Destination -- else return
* b+ Q# g. V+ z$ ` x8 { then
- M5 Y. v' G3 U$ @. v5 h @.Destination := void;
4 q. u8 H# |, _6 `+ F; C6 K7 @ if @.occupied then
& q5 c. a7 [+ V0 | part := @.cont;2 ?, n! ~: f: J2 d
@.transpOrder := void;% e( ?* }9 b5 x& V6 r1 D7 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 |/ n$ ^1 a! w- \5 M @,root.eventcontroller.simTime);
% M7 i7 o/ s5 B3 u, q6 y @.HasOrder := false; }# z% ]: T2 z5 |' q
@.DrivingHome := true;
9 E6 w \) f" W0 ^/ I- e. ^9 i rgManager.tryToStartTransOrder;
, @( P+ c% S6 {+ F* n8 w( E if @.Destination = void
! `8 ~/ t' j1 o, j! \/ ^: z! K$ ?$ D then -- no transport order for vehicle @2 D5 u% n: L0 A" S" V+ r2 o
@.Destination :=1 Z: z1 T: R, m0 y& F% v
rgManager.nearestFreeStation(@,track.~);
/ Y% [3 Q6 ^4 |" f newDirection(@);
3 N6 a& W* E8 S& v2 g if @.Destination /= void then
6 }, q3 u. n$ t+ c4 {& y @.Destination.NumReservation :=* j* ^) w8 i7 l/ G! P
@.Destination.NumReservation + 1;
! s. ]' ?& w# ~) E* V* Q end;+ G# D& J0 g" T8 i: X+ I
@.CurrIcon := "drivingHome";5 w8 }3 A& Q8 y n* x- U
@.DrivingHome := true;$ }( q/ o. J/ L1 F$ Q! ]+ B
end;
# c/ q, h% a# H else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 K; A0 l8 a! }. ], O7 v8 d
part := @.transpOrder;$ j2 p2 L, t) P- C8 f# }1 S+ u
part.move(@);-- load part
7 F( M" M# V3 a( y7 h& { @.CurrIcon := "load";4 c$ C" F) `4 _ w, i6 d
GlobalDistObj := part.globDestination;
- `0 i/ q2 ~: d8 O2 Q assignLObj := rgmanager.rgAssignL;9 l( u" Q3 k3 G7 q7 E) U! _1 U1 F
row := assignLObj.getRowNo(GlobalDistObj);3 t+ B8 _5 M( E: `" t% ~
if Row = -1 then -- since 70
& J7 e& j- G2 T! B/ ~( N( p5 W if lan=1 then% e8 `! c; Z. V% W" m( y+ r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) E! x+ l5 z* _7 f* q to_str("in der Andockstation: \"",?.~.name,"\""));
8 j- i8 w Z" E7 o4 }$ Z1 h else
r" z; D# B0 D' ]" o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) D4 ~" v* V9 D' j! o/ ~
to_str("in docking station: \"",?.~.name,"\"")); - F( h9 I8 P8 r4 r+ {
end;
% o6 l# l7 A3 {& P6 i7 P else1 _2 e+ A" n H* [' g
@.Destination := assignLObj[1,row];& m/ M5 f& j; S# P! r
end; 5 M+ j8 ~- O+ n) a4 s1 l' |
newDirection(@);
; f$ K$ [2 s4 Z$ U @.HasOrder := true;
3 ?! [7 E4 c2 a end;
5 J% ~# `% i) S+ F$ d end;
* C9 o1 l) s& A3 rend; -- of the method
* U' [2 W$ U! b: \! N* \. V |