/* called by: entrance ctrl of the object 'track'5 X/ c5 ?1 O s
*/* g# b7 g- |( o6 l1 G
is
1 S) t0 y; d/ K8 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 j* o& y: |" l4 Y* cdo
3 n* x1 {0 L9 q6 f& K0 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;9 a5 U# t. c4 ^6 r6 k
if current = @.Destination -- else return. g5 j6 X2 I, H) _
then
2 Q' [, D- q9 G) a' L9 J @.Destination := void;1 b. ?& J, W; @; g3 |
if @.occupied then' M/ s! W7 G! l; b0 J
part := @.cont;
) s2 v" I7 J, x9 }8 H @.transpOrder := void;! Y; {7 Z5 |3 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; @/ A5 Y: z# N0 z2 j8 F, H
@,root.eventcontroller.simTime);
1 F- A; ?5 _% K5 b c" C @.HasOrder := false;
/ }* K k: J, T! l& f. H/ N @.DrivingHome := true;
5 V: i4 }' u j9 \ rgManager.tryToStartTransOrder;; m5 X, U9 U5 N) r6 s
if @.Destination = void6 P& ]' K2 q, R/ J. p) V
then -- no transport order for vehicle @& K9 N: v" D3 |2 m3 K7 r
@.Destination :=5 K! N# D3 R9 N& c I% G# W
rgManager.nearestFreeStation(@,track.~);
: C8 R0 Q# ~, @5 y& q' h2 K newDirection(@); . u; {5 X' ~1 F8 B( i8 N" v0 p/ ` }
if @.Destination /= void then2 s* o/ [3 n# A6 R. Z- h: X
@.Destination.NumReservation :=# L! Q- _( X$ `* a! l- |
@.Destination.NumReservation + 1;: i0 P3 G o% h4 G+ @" N% [1 f
end;: i1 A" x' g& `6 F
@.CurrIcon := "drivingHome";# u2 p; J4 Q2 m/ S) \6 P. ?
@.DrivingHome := true;
. W, O. j; L3 Y. o; g+ p5 H end;
, C/ X4 x5 c$ h else -- the vehicle @ is empty, both vehicle and part are in the same dock station# Z5 g5 G# c# W M
part := @.transpOrder;( u& c n. d4 T3 O- g
part.move(@);-- load part1 ]3 t) B: F; J
@.CurrIcon := "load";
5 M: W$ j- L% Y8 B GlobalDistObj := part.globDestination;
* z; j8 B; q! {! K assignLObj := rgmanager.rgAssignL;
3 T9 x( |8 x5 L row := assignLObj.getRowNo(GlobalDistObj);
% Q* s& k0 s; _# U7 b$ F6 g1 F if Row = -1 then -- since 70: a2 G, a* c, s" ]: k
if lan=1 then6 \# [ W; q+ H8 `, w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) P5 A+ x) y% D to_str("in der Andockstation: \"",?.~.name,"\""));4 ~6 e; W, Y+ x8 c
else u9 A( W% d, w6 R3 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 } H3 K. P4 I) Z to_str("in docking station: \"",?.~.name,"\""));
5 T: S6 F. Y4 q6 p" _( V end;$ t- |) |" X7 t. q% j& Q. A$ Q
else/ r: [* u4 t9 z8 k( p2 T
@.Destination := assignLObj[1,row];, X# z ~7 c6 Y' \2 Z9 i% L; c5 d
end; 9 e4 q: o' N* T1 W7 _1 E$ ?
newDirection(@);% @5 u$ V/ u2 D) q: q
@.HasOrder := true;4 w0 u$ J1 e$ `* }4 o5 }
end;: D% x+ f$ A$ _4 J3 E
end;
, G- @ y+ |4 J5 c% P( ^' c& W4 z( Kend; -- of the method
3 ^# K+ o+ H: x; a' ]3 ] |