/* called by: entrance ctrl of the object 'track'
2 m* ~ @$ r) a" c" i*/
1 B+ y! C- j" h2 a+ p. i) ^2 zis( S R" ~. s6 t7 S+ @ O$ U$ q; f n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 q# a* W+ {% tdo& A# x/ @, M* i5 O0 X
Lan := rootfolder.Internal.Tools.AOLlanguage;# i' S2 ?$ M7 J" k/ s; G% b! Z
if current = @.Destination -- else return y$ [$ U' N3 g( C/ k6 ~
then
7 U+ r3 k# d+ Z4 V+ R! G+ m @.Destination := void;+ i1 T* d1 V3 Q# S8 E b8 o" d ^
if @.occupied then
7 x3 n, a, R3 T, h+ x8 c2 n! I part := @.cont;
1 m4 T' Y- m& G4 Y1 l1 u5 x8 x8 l @.transpOrder := void;
3 I1 D% L3 J! m8 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ |$ V5 [/ \. w' o
@,root.eventcontroller.simTime);) ]' F* i. m% e8 ^8 M4 z
@.HasOrder := false; g. R" R4 n `2 H
@.DrivingHome := true;
3 @( m% P( Q- P. n% y, O, T rgManager.tryToStartTransOrder;
* O; O+ b( N" Q; J) N! Y5 ]( {# v if @.Destination = void& A' G4 z( }% N/ K
then -- no transport order for vehicle @3 U1 H2 a/ X! H1 C
@.Destination :=
+ z, u* k: _5 _2 A" i. b2 @6 r R rgManager.nearestFreeStation(@,track.~);
8 k% }( X) m) \6 F newDirection(@);
1 \9 \! [9 f: P4 y" N if @.Destination /= void then$ C6 I: ^+ E5 ^: k# S7 a# w
@.Destination.NumReservation :=+ v A* m7 U9 `. f
@.Destination.NumReservation + 1;% @! T- T$ w% Z* R4 w
end;4 p1 G4 A) p! R
@.CurrIcon := "drivingHome";* i1 m2 n* ?( \- s
@.DrivingHome := true;. `& ]# H. s' a9 |
end;
# Y' ]4 Z2 }) Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ r1 M2 B0 ]; ^! B7 }# a part := @.transpOrder;, h8 T% J* X5 x; L( [1 A6 a
part.move(@);-- load part8 F" N5 Y, m+ ^5 b+ u( v
@.CurrIcon := "load";
7 M2 L9 ~8 I' |, y GlobalDistObj := part.globDestination;. K' P: U" L: F& P: _( R9 J
assignLObj := rgmanager.rgAssignL;
2 y6 ?7 n5 k9 R; J row := assignLObj.getRowNo(GlobalDistObj);
/ b+ D5 w+ f7 J* R if Row = -1 then -- since 70
* G6 @! g- h4 D P9 [* |9 Y if lan=1 then3 {# ~; Y* T$ r$ K, D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& q' \& B- e; r/ h7 P to_str("in der Andockstation: \"",?.~.name,"\""));' S8 _- e% G8 D2 m
else# c z% G- R$ }5 K8 J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 L9 r/ t J2 z& {1 I p/ K: R& W to_str("in docking station: \"",?.~.name,"\""));
# I6 ~$ k9 m0 p- {9 G end;2 W4 |* W. j, J+ X9 b+ [
else
+ H! x0 `5 v, M3 \* r @.Destination := assignLObj[1,row];
' T3 ? i# ^- H) H* k1 _8 B end;
7 N: T$ j) H( B# d& L2 }3 q8 f+ F. W newDirection(@);& s e5 g* ?% z& N: c8 q
@.HasOrder := true;
) L5 _5 }" X; y! Q end;) S; r; M- N+ z+ U7 F2 n
end;
1 U% M+ A+ E* p, t$ pend; -- of the method. m: m! \& S) f
|