/* called by: entrance ctrl of the object 'track'
7 x. R4 k) } f*/. _% x, U9 G$ s0 t
is
" P' b* f3 G+ I+ V: O; | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 @- _6 q9 \# U$ j+ r$ Kdo
: _6 y, a8 `0 s- E' F Lan := rootfolder.Internal.Tools.AOLlanguage;
B2 n8 f' i B6 ]5 q" q2 V) k6 N if current = @.Destination -- else return
z1 D" P1 t: V, A7 e3 f- f then: k. A% ^; c9 Q3 ~
@.Destination := void;8 p# ~% [( N! q! l" W! b
if @.occupied then
9 A$ I' w& @8 b( E part := @.cont;
5 c& u5 u" t* @2 x' U1 f0 V P @.transpOrder := void;
- ^$ t _: C/ ^0 x; s& f) \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 R3 e' F9 [: j9 |) e: B. } @,root.eventcontroller.simTime);; G9 m. i- P. [% z
@.HasOrder := false;
- a5 p% ^( z4 `/ w* V, t( R& b @.DrivingHome := true;
7 p, s& H4 m1 i( _9 r rgManager.tryToStartTransOrder;. u! k# l$ r. e9 B: I! c- x6 O
if @.Destination = void
% a8 K1 B: D1 o, K2 y then -- no transport order for vehicle @1 S H6 \" {) F& M; d( m, e
@.Destination :=
% Q& ^7 l9 `% }' X0 W9 E m rgManager.nearestFreeStation(@,track.~);4 P/ x, ?$ u6 R/ U4 }
newDirection(@);
! Z% f# l2 J. D if @.Destination /= void then5 L, d5 P# t5 v
@.Destination.NumReservation :=
. e1 n N: I7 b G, u/ |* v% C8 U8 i @.Destination.NumReservation + 1;/ {6 e) W4 B: u$ |6 x7 n- w2 c" o
end;/ V r, f9 i- `9 C5 ]
@.CurrIcon := "drivingHome";
7 j" L, a/ F4 u2 u' i! j1 x @.DrivingHome := true;
5 E! V, O1 G# }0 d" N% X+ e0 J$ U end;
# S6 M4 g" k& x/ L7 ^) m% k: D$ r+ s else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ j$ w2 X9 d, s
part := @.transpOrder;
! V5 D/ e$ Y8 ?, M- } part.move(@);-- load part
7 u$ v0 z" H# Z) [) N* B7 ^ @.CurrIcon := "load";& [: \" V9 `- F' K. ^" g# \
GlobalDistObj := part.globDestination;
1 ^9 P" w* u. p6 b" U4 p! {1 b assignLObj := rgmanager.rgAssignL;
. G! I# Y3 N, o( u5 z row := assignLObj.getRowNo(GlobalDistObj);
% Z& _1 q3 i v2 I if Row = -1 then -- since 709 F3 f! K1 G; r
if lan=1 then7 o2 k# ]" A8 [' r1 d7 t+ n/ P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ V3 m) A: O. c6 `
to_str("in der Andockstation: \"",?.~.name,"\""));
' c% v4 `* f0 f else
& I) m' Q! W. U* ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ g0 P- Y# ]5 f+ ? S2 q to_str("in docking station: \"",?.~.name,"\""));
0 O& e! J8 q. p j4 F end;
& P9 v- E3 t% M4 O6 P else0 N6 a8 `3 l( T; ?5 G% a
@.Destination := assignLObj[1,row];
/ {, t$ W9 C. ^( z end;
, J, v$ J0 s' m1 c* g& e! s& \ newDirection(@);! \+ g" J& ]# T2 w1 J& f
@.HasOrder := true;2 X! _1 y% `; c9 a
end;
2 O. b( t; C& T6 u; c# h* M$ N end;
, t+ f! r! h2 ~" o" vend; -- of the method: |" w0 n% P6 n! r0 E' U: W8 |6 T
|