/* called by: entrance ctrl of the object 'track'( B$ s- |( q' D9 A+ z
*/
( B9 ~! d. c! m* V3 Pis5 q$ a- h* k/ W- B8 p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 T X( d2 A+ J- \8 ]2 D: Hdo( ^ a2 B8 L. @2 o8 K$ Q8 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
; t5 m( X1 }2 d% j if current = @.Destination -- else return$ L/ K/ J8 {0 B% v C$ K
then
+ ^; C. G5 ~8 u P @.Destination := void;
/ D/ D9 I2 m/ z4 }( i& i if @.occupied then
5 L$ i# E- C8 c7 K, f% N part := @.cont;
7 _& N" ]8 |- W @.transpOrder := void;4 b& e8 T+ W/ g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ ]' B1 @6 c! V2 F! R- a+ G" i- v
@,root.eventcontroller.simTime);& C4 p* C4 Z/ \
@.HasOrder := false;
$ ~' F3 m& w! Q, B @.DrivingHome := true;
1 B6 Y1 B! y0 W4 n' C rgManager.tryToStartTransOrder;
& D+ @, }5 m4 P4 Q. U$ l0 l' Z8 X% _ if @.Destination = void2 ?! J1 V8 C' [
then -- no transport order for vehicle @
3 i- X# q% K( z- Z @.Destination :=
5 L* _- k6 c, {; w2 f; R rgManager.nearestFreeStation(@,track.~);
: ~2 m5 ?" H2 v* Y6 D, X- V newDirection(@); " X6 R- }9 X; y$ z( y
if @.Destination /= void then
. ]5 @. n4 G: r0 l" R @.Destination.NumReservation :=3 Q3 k% E, e- s7 T1 V/ B( o6 {3 Y
@.Destination.NumReservation + 1;
% a0 L+ x3 E1 a" W& h3 [ end;) {+ l! ]3 m3 M1 H5 k3 Q0 ~: t. m
@.CurrIcon := "drivingHome";7 G: q4 p t6 {0 X1 \
@.DrivingHome := true;
|' s4 u! u' D U& d8 w end;* a6 e) H7 C- \% C' P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) l" F4 Y' F2 c part := @.transpOrder;
/ g l, p) n9 y3 Y3 k8 X m1 X, S/ Y part.move(@);-- load part
6 ?* j! X P, } @.CurrIcon := "load";
, L8 T8 Q* U) W; F GlobalDistObj := part.globDestination;$ q# D) ^0 h2 G4 b
assignLObj := rgmanager.rgAssignL;
* ]: I% v: K1 [5 O4 r row := assignLObj.getRowNo(GlobalDistObj);7 `! ^7 J2 ^3 b# ^, \! g5 @
if Row = -1 then -- since 70
7 G, ^& g- J/ M6 S if lan=1 then3 t; _* U5 g* r6 {- b" ]8 h C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ y, [' c9 N1 q) y
to_str("in der Andockstation: \"",?.~.name,"\""));) S: X! V& t; j: F
else9 M( b) U8 W* X9 E: U2 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; v# B& N( P9 G' \( j+ b
to_str("in docking station: \"",?.~.name,"\""));
* l7 f M9 X4 @: C* x end;) c) R- D0 E* t8 M! ]
else: D4 j8 f/ H) N* L: n
@.Destination := assignLObj[1,row];
: N' j. J) m5 p9 K& s* t end; ; l2 s& k% I3 M S/ j, Z) M% x$ B
newDirection(@);
- w1 n/ V2 y ~) b+ S @.HasOrder := true;9 L8 [+ }6 G% w2 y4 g
end;; o1 w) b% a- w. a9 N1 O6 h- q
end; o# G) J3 h+ R3 h' N7 T' |: u
end; -- of the method
- k3 V$ V$ _5 N3 _4 i |