/* called by: entrance ctrl of the object 'track'! x" v- j$ j$ i( S! B
*/ n {$ i4 V1 w
is
3 @ }) ?/ H' O; m: U ]$ w' ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ]& P' R! v8 b% a8 Zdo5 D9 N* z9 s1 i% U5 @& E0 a
Lan := rootfolder.Internal.Tools.AOLlanguage;# h( X1 z9 d# s+ D4 I5 h
if current = @.Destination -- else return4 [# E/ T3 ?/ X% m
then, N0 o: Y& X/ `( C1 i- L
@.Destination := void;, ?; Q, Q" F# p; C/ R! M' \
if @.occupied then$ z: u5 L, s% g4 S% x7 S% o" F
part := @.cont;
. t/ x6 h3 j3 ^! F v' x; n @.transpOrder := void;, J, f+ Z, i$ c: h3 a! R9 I4 i4 h+ [' D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! E5 G V9 A" f! ]8 M
@,root.eventcontroller.simTime);
^- E+ J6 D5 _ @.HasOrder := false;
, J+ m$ @+ U. x8 E; j @.DrivingHome := true;
7 O' h( N- X8 G" ~ rgManager.tryToStartTransOrder; V! F, e' s! C+ m
if @.Destination = void
, O) H, B# t+ M: K/ v then -- no transport order for vehicle @
3 t# w. d6 J, q$ u$ _1 @) h/ L6 L @.Destination :=( d3 A! O0 U4 M+ w! j
rgManager.nearestFreeStation(@,track.~);
- Y5 Q; b, d2 T newDirection(@); 7 v; A- o/ a3 V" T4 L) P% U1 V
if @.Destination /= void then
8 P1 v) ?. m5 C+ I( J8 v @.Destination.NumReservation :=
& ?$ u- ^ Y2 e0 g! Y5 a @.Destination.NumReservation + 1; u5 L& f) I( @1 l
end;, ^9 J6 \0 `% X% r
@.CurrIcon := "drivingHome";
( Q, w1 B3 |" s6 ` @.DrivingHome := true;
5 J( A$ O: C0 Y9 w& I end;* y0 U* t) h" q7 E1 f% j; z- x; L/ Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 O3 \; @ j' K# p1 W
part := @.transpOrder;
- a: ?* y# N! n, T4 ] part.move(@);-- load part8 z. N/ C8 F! |' W
@.CurrIcon := "load";
5 M* y/ o4 j! @* B, W' P2 D& u& | GlobalDistObj := part.globDestination;- {, C9 L- B' k* m7 Z/ _
assignLObj := rgmanager.rgAssignL;8 A8 v2 R$ _+ v1 r: D; ^' A$ M
row := assignLObj.getRowNo(GlobalDistObj);! D3 @+ X% z( r( O$ v" ^2 [7 R
if Row = -1 then -- since 70- o" [& f t$ V3 q B( f" q
if lan=1 then6 y9 [# B' Q4 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ]" Z$ F8 k' v. Z7 R
to_str("in der Andockstation: \"",?.~.name,"\""));) L" A' B! q$ t) ?" I0 V0 @
else
$ t: b: v7 h! u( {2 F' j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 @) r3 a4 ?0 ]5 T3 | to_str("in docking station: \"",?.~.name,"\"")); 9 ]* ], x, _% ]2 J
end;
# P" N/ Z% w a( `' z else# n# [- |1 P0 @8 _! K' l" O& L
@.Destination := assignLObj[1,row];6 |! {0 ]/ c. g( @; R/ T
end;
+ \5 ^ @8 P) M/ I9 @1 R newDirection(@);; ^" m$ p, Q J
@.HasOrder := true;
o5 ]0 K4 H( v, K9 p+ \$ j end;
: o0 }; S; d6 g end;/ U/ `! h: A% ^% o0 P2 |/ ~/ j: D& k q; g, t
end; -- of the method& ^* [1 ?4 _5 R+ B* o
|