/* called by: entrance ctrl of the object 'track'
$ n- i8 r2 a) g. r/ u! ?*/
) K, |: Z5 @) j) P4 |8 B$ B6 E; ais, z' }* D6 k. D7 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ m! s( \ ^* W: E+ Gdo' I0 }& |6 \) d% `- T
Lan := rootfolder.Internal.Tools.AOLlanguage;! W& p5 d& ~' {
if current = @.Destination -- else return( C9 W! O& q3 j6 ]
then
9 t/ ~; _0 P, Z% r4 }8 K8 K1 j @.Destination := void;
0 c9 K7 N; m& o2 @0 t8 Z1 M: Q if @.occupied then
2 O1 G7 { c" R* e part := @.cont;: i) A* |3 y5 y/ n2 A3 y
@.transpOrder := void;
* U/ }/ v0 u2 _1 u) @4 g! ^1 f V( R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 @2 j7 C+ S( u+ y) B
@,root.eventcontroller.simTime);; L3 R2 H5 ?! T! I
@.HasOrder := false;
: `) ]/ M* H- r X- A R8 Q% } @.DrivingHome := true;
" k d( B- f% T' ]( g& _4 I% R rgManager.tryToStartTransOrder;1 G. t* u: |& _: \
if @.Destination = void8 ^5 E4 C9 D/ \9 K9 e
then -- no transport order for vehicle @# J' L# j/ m+ L2 V! ]1 k- t
@.Destination :=
: ~( }+ L* i5 D& s% H; m3 x9 P7 Z rgManager.nearestFreeStation(@,track.~);
; |6 x5 }3 X! g L8 Q- U2 }: |8 ` newDirection(@);
( e2 w0 m& a4 d; W; C3 V if @.Destination /= void then- x: g* `: N/ G$ O) M: d1 a
@.Destination.NumReservation :=
( L9 F$ y2 e4 }% J8 i, B @.Destination.NumReservation + 1;. k" S0 K7 n6 G
end;# N4 A' A2 u$ E4 ~9 X5 U
@.CurrIcon := "drivingHome";
5 u' V7 M( ~& h# I2 S @.DrivingHome := true; w3 G) ?+ G! |9 ?/ M0 K
end;
) |# T' H$ N: @8 O" e I9 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) {4 R4 x4 {& Y6 Z1 o part := @.transpOrder;
& c' ^' X8 N' @+ `1 P part.move(@);-- load part
; ?6 }/ D2 j4 X1 M7 q @.CurrIcon := "load";
) s' ?1 I5 K/ K% | GlobalDistObj := part.globDestination;+ Z+ r' D/ L& m4 j p3 {1 D5 G
assignLObj := rgmanager.rgAssignL;
( X$ q) d2 ^) W. ?0 \ row := assignLObj.getRowNo(GlobalDistObj);
( A' h4 k2 j8 `# s3 L, a% o if Row = -1 then -- since 701 N2 ]3 d6 U- b! L9 K d
if lan=1 then
+ {: C# f8 r$ q C0 j: P! b5 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Q& t+ i/ B" X* p to_str("in der Andockstation: \"",?.~.name,"\""));
4 y# r ]' A# V& e2 ~& s/ n2 y else
% h) m! r/ c9 c9 ?5 S1 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 L/ f8 ]3 }+ i6 b
to_str("in docking station: \"",?.~.name,"\""));
& E# z6 J' e2 o, M2 S0 Q end;
4 C8 E Z1 O! o0 W* Z5 e1 T else" p4 B0 \% e: e& I0 o# C
@.Destination := assignLObj[1,row];
/ y. i* p) y8 S: s# R: |& q8 I. \ end; 7 r$ ~9 Y, x" Q
newDirection(@);
1 E& F% p! ^3 u" @4 S @.HasOrder := true;$ y8 c5 I8 a5 e# m- z7 R" U
end;% r: X, \, d# ?- Q* {( M- L# T! H
end;- l% T2 S& L& `6 h. B2 C
end; -- of the method' Z- T, p# \, @6 l6 K$ t% V
|