/* called by: entrance ctrl of the object 'track'
4 _: ~' [1 U' J- B& P9 [8 G" A*/' v, { K" O% I5 B: J0 p: M
is1 r* d2 R' C& _- f$ C4 R9 W2 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: F5 d) T& ^5 Y) \6 m6 }/ Udo7 F% }( B& H6 `. r& n: O: [
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 S' d. a5 I' O# [" } if current = @.Destination -- else return
! a5 t' s* @% m then
) M5 @3 J+ ]4 Q: r# G- X8 L0 S @.Destination := void;
8 c$ H$ R- H& O1 m8 P# I if @.occupied then0 ]; K9 c, `! l- ^+ X4 u5 [6 E
part := @.cont;
" Y- `% [$ e6 g# t B @.transpOrder := void;& H' T8 v- ^8 e$ _5 m! t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, ?# u' }( O4 ~( |4 I: I; g @,root.eventcontroller.simTime);
4 z, `% Z1 S, |- U( j @.HasOrder := false; x: n& l* `& @, P' J, r! V
@.DrivingHome := true;: ?- e. H, G' [ O9 t4 z+ \ P$ b
rgManager.tryToStartTransOrder;
0 Q, m1 w' h F0 J( g$ ~" _ if @.Destination = void
* }0 x8 y7 G3 A, N! W& e t then -- no transport order for vehicle @( d! N6 j1 F) Q. {5 Q
@.Destination :=9 ^/ E2 Z) q% D0 z' y
rgManager.nearestFreeStation(@,track.~);7 G3 h, a& c6 E* ?) C' k& j
newDirection(@);
+ ^* e) \) O, k! }5 z if @.Destination /= void then
% s( R K) N* U" m1 _. e @.Destination.NumReservation :=
) W; K0 ~$ w7 D0 |4 M @.Destination.NumReservation + 1;
4 o; B* \6 z9 ^# ~9 |5 C end;
( ?0 F! J" ~. a, n3 Q [5 V) `( ` @.CurrIcon := "drivingHome";. V, ]; i; D# [# \; X
@.DrivingHome := true;
/ C& X* u( ?8 r3 w end;
0 A1 w4 l2 K W- S# w else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ]5 Y' \# K1 A4 |
part := @.transpOrder;
9 E; [7 N1 L0 ~ part.move(@);-- load part- w5 `" L% S/ V- B+ c+ H1 H
@.CurrIcon := "load";/ g# p" p. k, J: {- A& U
GlobalDistObj := part.globDestination;5 r' L/ n; j( l6 {
assignLObj := rgmanager.rgAssignL;8 s8 b- ?' t9 z6 [
row := assignLObj.getRowNo(GlobalDistObj);
% G. R9 V {8 @/ u if Row = -1 then -- since 70. b1 D$ v- n' E& S! w! i% S4 R
if lan=1 then) v+ [2 g5 d+ Y+ k8 u* C \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# Y- u$ g4 |! K to_str("in der Andockstation: \"",?.~.name,"\""));
9 }) { Z* b' N( u0 w! S6 q: _5 a' G else" B$ r% u- z/ \ ^ C3 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 W9 k) `5 W3 e! j i
to_str("in docking station: \"",?.~.name,"\""));
- {; c& N1 i5 f' ^6 f/ P end;! t- U; I a6 \+ S4 W ~
else9 X+ \+ ^/ _+ O0 J" b
@.Destination := assignLObj[1,row];
3 _; m6 S8 G1 t/ r( M# k% U" \ end; 1 `; W6 j P9 g# i0 ?
newDirection(@);
. {4 y3 I! y7 h* @& N, r7 {- r @.HasOrder := true;+ x3 g: f% r/ F+ |2 D; O
end;
8 H+ O }0 k. O& h$ F6 |3 a) K& J end;
" o3 ?8 Y- e' E4 [9 t: zend; -- of the method
3 {, ?8 L( n3 z4 b$ V; a, E |