/* called by: entrance ctrl of the object 'track'
; i: ]0 i' i F3 h: `9 N# n) J*/$ k, \0 L$ x( M2 y9 T
is- w& t1 o- k* P# N, i: m* V2 C8 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" ~+ c V5 W) Z; N, |# ldo
1 f& S: o! s' B. q* u Lan := rootfolder.Internal.Tools.AOLlanguage;
. {1 s* _+ ?! |$ @% R, U5 v0 ? if current = @.Destination -- else return& u8 B8 ]* C J+ Q0 ^4 C2 p3 k( M) p
then4 r. ]9 m- t y$ i/ T& {2 b
@.Destination := void;0 L/ W( ?6 E7 V1 D! C
if @.occupied then
2 p6 ~/ L& Z3 u8 y1 }, N6 m part := @.cont;
. E( O V( j/ t# E/ }& `, h @.transpOrder := void;0 T) @' m& k" }2 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 x8 k4 {- i, E+ D8 [5 u/ f2 K
@,root.eventcontroller.simTime);, [% w' M- p: X+ K& ~7 C; F6 }
@.HasOrder := false;
' R! b, d3 f, A& I8 g$ t: Q. z @.DrivingHome := true;
7 U( h) x& x4 h% G rgManager.tryToStartTransOrder;: e1 D- V* d# l
if @.Destination = void
% `: G2 I, D9 N+ h! ~& n then -- no transport order for vehicle @
3 F* A' q- j9 T: e @.Destination :=
! } l/ D: ]0 y" z: a8 S rgManager.nearestFreeStation(@,track.~);+ Z; ~3 e) f8 I1 q# F4 |
newDirection(@);
8 y; x, f! n+ A1 _ if @.Destination /= void then1 f* _7 I6 K9 G
@.Destination.NumReservation :=
: W# o; b& q/ T7 m @.Destination.NumReservation + 1;, s% j) r4 R7 e* L5 y
end;, _- K2 |5 B) V3 {9 N' @
@.CurrIcon := "drivingHome";* T/ [) o. f6 p+ x0 H7 I
@.DrivingHome := true;9 x5 l) ~/ I) [" k- t7 w. u4 z0 o
end;
. C6 X+ }) j1 k& ~" f, z' m else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 t- ~+ u. @4 M
part := @.transpOrder;/ W/ \9 T1 r- {2 R8 i2 X- u( T/ `
part.move(@);-- load part
1 H- h' Q2 T! [' v: e @.CurrIcon := "load";- ~9 O1 P1 O6 i0 Q3 m
GlobalDistObj := part.globDestination;
) W6 x5 m# q' M" B2 m assignLObj := rgmanager.rgAssignL;
5 W4 s2 {! e5 d0 X6 | row := assignLObj.getRowNo(GlobalDistObj);
* m/ K- [# d% H9 n if Row = -1 then -- since 704 d/ T! {; p. J/ F: o# ^
if lan=1 then
4 T- p2 P" P0 h1 J l2 ]+ m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& H: m9 M% F, w) b: `) j+ e: M4 L1 F
to_str("in der Andockstation: \"",?.~.name,"\""));+ E- e7 Q$ c5 c' y: y K
else
2 c0 S, I* C& d. q4 { T. ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 V( m7 m# N1 z- r5 |( r# A6 n to_str("in docking station: \"",?.~.name,"\"")); # ?9 a1 T( W2 K
end;
s( {) h& D. J else( ^, ~4 C& ^+ Z: }2 W+ l: h
@.Destination := assignLObj[1,row];9 k. V2 {( t1 e$ @" Y4 J' u) l
end; : o S. c" E8 c/ E
newDirection(@);
4 |, A4 Z: F. D( U# I$ U @.HasOrder := true;
8 a; \' h# A# h# Z, i* }) b end;
; _ E. b; [" Y4 e( \9 n end;4 g; a+ ?& X. u6 y
end; -- of the method
6 X& d5 ]. C4 g7 L# f- P |