/* called by: entrance ctrl of the object 'track'/ ^( J/ M6 o! F, F: C: E( D: F
*/
, R2 _; w6 B0 G* s- c# sis
v% p$ T; L& q6 J" ^: i) M; D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 O; I/ W* [8 u6 j8 a& [" q* qdo
, N- ]9 F* u& j/ R Lan := rootfolder.Internal.Tools.AOLlanguage;
6 i$ q7 A z; m if current = @.Destination -- else return
; M W1 t5 w+ C4 y9 D/ Y3 u+ X9 A: _ then. A+ T1 p" d" R& p# l
@.Destination := void;
4 t0 \' f/ [/ N8 h( e) { if @.occupied then
8 P2 i: L8 \) `' _9 G% `6 g part := @.cont;3 k+ s2 [) B* |$ u
@.transpOrder := void;' m: T) _# o& a& |7 |5 C( j- L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! u ~! o+ V/ c+ i. i- M0 B- q
@,root.eventcontroller.simTime);$ s' g6 T' M4 U* p2 a( [
@.HasOrder := false;4 d6 |6 A- G/ `! d5 K
@.DrivingHome := true;" I4 q4 |; N ~/ F8 z0 ~
rgManager.tryToStartTransOrder;
1 z- q1 t' Q# z if @.Destination = void
6 c9 q# T; R7 k' Q" l then -- no transport order for vehicle @
) P2 _6 V* ~; T* c @.Destination :=
) Z7 v0 ^ A5 ~- _ rgManager.nearestFreeStation(@,track.~);
" ^2 v1 h" @+ M- n newDirection(@); ( C4 W4 x& ?: |7 j
if @.Destination /= void then; j9 |4 O9 k- ?* Q. u
@.Destination.NumReservation :=" Q E' \' x, x4 G$ ]6 u
@.Destination.NumReservation + 1;; x: U# `2 O4 W$ M7 Q+ m: R
end;% B, d: ~( P! a% P- Y
@.CurrIcon := "drivingHome";
. ], i+ O7 J# Y$ H- g) R @.DrivingHome := true;
% F4 j9 E$ u6 c4 b+ P5 E" w" l end;$ f" I2 k7 O, ~( g; O! [# U8 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 z) I P9 y% v& o$ d" @ part := @.transpOrder;
+ T0 w7 ~# d# B8 Y5 y8 X( w1 } part.move(@);-- load part
( y0 w) E. G% w; c; G @.CurrIcon := "load";; P- y _) q$ |: J9 v" k: [
GlobalDistObj := part.globDestination;
6 w7 I6 ^, g, U$ C9 H/ E$ @ A9 { assignLObj := rgmanager.rgAssignL;
E8 C! P1 g9 {5 F H/ ` row := assignLObj.getRowNo(GlobalDistObj);9 _9 a% a- [2 P# P
if Row = -1 then -- since 70
5 `0 A" }3 s$ T1 @ if lan=1 then- B% \- f5 V" B/ Z7 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 d- j: _6 M+ n- q& Z( }, T X# D
to_str("in der Andockstation: \"",?.~.name,"\""));
& t% b0 n; n. f% d5 K' A( p else
; l* n: U. S2 e% Q" m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 B( v4 K: F* k* ~' Y7 l to_str("in docking station: \"",?.~.name,"\"")); ( f r) @+ @: S! U2 P4 ]
end;
0 B$ {# o9 f1 o( L else
- `8 O- }7 o& c! N9 X( x4 a' J @.Destination := assignLObj[1,row];
. V" J2 G' l b: e end;
4 v9 h4 Z, W3 J newDirection(@);7 p2 U; f2 n, w, w& k
@.HasOrder := true;
/ I) f$ j6 P) R3 u7 [% Q end;
" L3 h4 H+ R2 I& r' ?8 P end;
& y7 `- d' H+ M+ i1 S6 _1 Y6 Nend; -- of the method" l7 [6 l5 _! {$ \
|