/* called by: entrance ctrl of the object 'track'. \. E3 B, w+ v1 m
*/
5 t# |8 R3 @: Lis
& E- k6 ?" G6 @- Z7 v$ z6 |8 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 l. |* i* ^8 C0 I, J2 d4 Ldo
0 x8 q; t0 Y f% d/ ~8 U Lan := rootfolder.Internal.Tools.AOLlanguage;8 a* o9 l$ G. _1 _ i1 W* ]! ?
if current = @.Destination -- else return
8 ~( l0 b( d% i+ t8 O" x: W then
/ s% M& I' ^6 N; \; ^+ R. w; k @.Destination := void;/ E/ k( c f% m0 R
if @.occupied then
5 H8 O% y' W& C0 |: ^7 @) Q) _ part := @.cont;2 @4 V: D) W7 S2 S9 T* z
@.transpOrder := void;
! v8 b9 g3 t0 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# {( W% R1 X# t+ U9 s6 O3 i: I @,root.eventcontroller.simTime);: X, ^7 ^4 |8 W8 d
@.HasOrder := false;* U7 w7 U( @* @/ [" I
@.DrivingHome := true;+ B. J; Z* U9 E' I* t! h' T" A
rgManager.tryToStartTransOrder;3 h8 A' z- `. S5 p2 I
if @.Destination = void
9 Q7 P' h9 [+ P then -- no transport order for vehicle @
! m* R' r p) i/ J @.Destination :=
0 H7 x: c' ?4 ?% U/ Z rgManager.nearestFreeStation(@,track.~);
/ P5 z% i( s, R& B: N3 U' P newDirection(@);
- h# i1 ^( z8 N& ~1 X+ B$ B& k' i if @.Destination /= void then8 X7 F' L ~) K0 w# M: x3 _
@.Destination.NumReservation :=2 }, o+ I/ R5 B: c" x+ n. c
@.Destination.NumReservation + 1;" t( o4 z1 F z6 Q0 j
end;# K- h7 J+ A! D
@.CurrIcon := "drivingHome";* _" ~9 @) S+ r6 Y. b3 ]$ s! ~
@.DrivingHome := true; U( j# S j0 \; h
end;
* J. v( i6 M- k& | W9 y else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 k. C4 b& i$ o) a
part := @.transpOrder;8 i1 ~* L& }* | j0 t4 |( Q3 S4 M
part.move(@);-- load part
; d2 w3 I8 _0 h+ p5 Q/ f4 t @.CurrIcon := "load";+ r' D( \% [3 I& P
GlobalDistObj := part.globDestination;
/ v* A: v+ Z6 M5 d assignLObj := rgmanager.rgAssignL;
/ W. s; g2 M; \4 o% G; G row := assignLObj.getRowNo(GlobalDistObj);
1 n4 e8 n1 e. z5 D% Q2 f if Row = -1 then -- since 703 o7 h9 j1 p: d6 W) F7 @; I1 g7 i, |
if lan=1 then0 q1 B M) T' V3 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
G9 G2 ?* }( f; v: `3 E to_str("in der Andockstation: \"",?.~.name,"\""));
3 x- E4 D! q) Z) ^ else7 X* j! t( @5 o9 O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" s" W h- X- Z. C9 G# U; k: x( C to_str("in docking station: \"",?.~.name,"\""));
9 N! N" s$ s I1 U' q" x6 @ end;
$ A6 r9 h9 u. |; V8 Q! f3 G else
0 o' L, \0 e! C7 E* Z @.Destination := assignLObj[1,row];
$ v/ r& B) `) S0 n+ o; Y4 F+ @ end; 8 J, d" ?" E1 d( X% L3 ?8 l- J1 F
newDirection(@);" Y# u& e/ w" @4 B) P+ z' ]8 ]
@.HasOrder := true;3 s/ J$ q0 t) w7 l
end;
$ w u) Q0 | h4 W end;( |- K5 K1 G$ s
end; -- of the method
3 I: l% F: o* t/ k: C9 B1 Q. F |