/* called by: entrance ctrl of the object 'track'
% q+ n9 C9 R0 f3 f0 S* A% k8 d*/
% x/ b5 U# [# S5 n7 ~ k7 His
1 M, |1 A6 Q+ m9 q, _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D1 w2 c3 {: r) L# W
do% i z" L) k ]4 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;6 G1 _: D! S+ o( C$ k5 S9 M
if current = @.Destination -- else return
, y+ R5 S" \0 i0 E9 P then" {2 z7 ?- ~5 U7 q4 H' v
@.Destination := void;/ B2 i z- D5 G6 S- ]+ U
if @.occupied then- |5 [0 X [* A5 [; H: }
part := @.cont;: X, H, g; Y, L: ^/ l
@.transpOrder := void;2 T1 T5 S& H4 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- g4 Q! c5 c! A8 `0 @6 f* } @,root.eventcontroller.simTime);5 Q1 B k, B1 c; [% \8 N. [# _6 I9 H
@.HasOrder := false;
' C, l2 R6 y: k* a! d& t* | @.DrivingHome := true;
% }- d$ O8 N1 c0 Q0 c rgManager.tryToStartTransOrder;
7 h7 x1 J! f% N- A if @.Destination = void
0 O# E+ ]5 X* y: S4 o# {: N1 O) h) E then -- no transport order for vehicle @
+ r2 s6 r( [+ U8 ~" O& ` @.Destination :=
5 ?) M- N8 u0 p6 l `% c" Y! B% x rgManager.nearestFreeStation(@,track.~);+ s6 s; v2 m$ ?) h
newDirection(@);
5 ?( J T. E" g- ?) J if @.Destination /= void then
$ U6 T* `9 h) h3 _' V @.Destination.NumReservation :=7 q, h; ?" R2 G# ?' `
@.Destination.NumReservation + 1;
% @( Z& Z9 S4 a# A; K! s" p7 d end;
, ^( `8 O; G) s/ Q, y5 t A @.CurrIcon := "drivingHome";% Q* B) H+ e0 d3 O9 Y
@.DrivingHome := true;
+ s' d3 X; F, D+ ~1 T: ^ end;" O( Q8 N) z3 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 M6 s& |; R. H! }
part := @.transpOrder;
5 f! Y) y! y( [. V6 ? part.move(@);-- load part
7 V& c! Q3 [+ f2 M. d% E5 P @.CurrIcon := "load";
* E' ]7 u ?6 Z GlobalDistObj := part.globDestination;* V' N1 t/ r) L& \
assignLObj := rgmanager.rgAssignL;
1 H7 Z( m; Z8 v: D. { row := assignLObj.getRowNo(GlobalDistObj);. j" [9 E: p, V% `$ \. B3 X
if Row = -1 then -- since 70
4 ]. S! `$ U& {2 [ N if lan=1 then
) I: B- N- W' }% m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' w4 k) n7 K3 R6 W6 u- B to_str("in der Andockstation: \"",?.~.name,"\""));% S$ D# |. N) g" H
else
$ |$ k1 m7 h% j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- h" v% u# L2 [4 t# v to_str("in docking station: \"",?.~.name,"\""));
4 u; k. k; k! r4 ] end;
6 F, [* t8 |/ k" v- q else$ l [- ~, D6 y7 v# ?5 M
@.Destination := assignLObj[1,row];
: R s4 |3 d& S0 \# g end;
8 q$ I$ e( D' `, T5 N newDirection(@);
, f' T+ `3 `( e v. V$ _" S @.HasOrder := true;
+ o, h* S; M" [, O% s end;
0 O2 R. G0 v/ g8 U end;3 H/ ^- k' |( |' \ {
end; -- of the method D5 v9 L2 b" n6 S8 y
|