/* called by: entrance ctrl of the object 'track'$ h" T/ Q) a, @, a5 p8 k# i
*/+ r# D/ J& k9 T! y( e) w
is
. S; R9 e, ~4 G( R: G! I part, GlobalDistObj, assignLObj:object;row,Lan:integer;) T! s/ _: C* u. u- L- D
do% O7 F# ]2 O0 Z' k+ }
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 Z- w: |4 U! v% g5 H if current = @.Destination -- else return
0 c) c9 Y+ C# c+ s+ C. q, l then( E$ q' R/ C' Y6 Y" v6 z' [" Q
@.Destination := void;
0 Q, L2 D; J0 }6 ?- g9 P+ J if @.occupied then
2 P( x& q1 z$ n6 c$ p1 V/ l part := @.cont;
1 v- f5 N; }) ]- N @.transpOrder := void;
/ K j; x; I7 F! K3 g9 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 J1 U+ x' M6 h! p/ ?! J' w
@,root.eventcontroller.simTime);$ O# O- G# y- p5 |5 E) b: M
@.HasOrder := false;, I) |( _. k; J! b7 D
@.DrivingHome := true;6 A: G, t8 ]' {! B
rgManager.tryToStartTransOrder;
6 r& p7 E! h$ y) q2 ~: p; ?/ Q if @.Destination = void
( Z' ^5 }* c8 T then -- no transport order for vehicle @
1 F5 t1 z. s* D9 E7 W @.Destination :=2 t( w1 m2 \8 k* [; J4 u9 J( B
rgManager.nearestFreeStation(@,track.~);& q$ F- d# @" v: P4 T
newDirection(@); % E2 ~; p4 @8 j( b$ D8 _
if @.Destination /= void then
6 V3 e1 e( o- K* z @.Destination.NumReservation :=8 \# x$ t, h/ Y4 v
@.Destination.NumReservation + 1;
$ _5 d w+ ?& U, l( J' r end;, q4 ^, \% V' D2 L, X0 O% N( [: f% d
@.CurrIcon := "drivingHome";/ Q( o7 R/ v" C; }: f
@.DrivingHome := true;9 q4 t4 T' o& p7 m: ~. \& n2 R
end;+ m! o3 ] B* V( v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 t; y! M; y4 E; x* p1 K, W% G part := @.transpOrder;8 R& u" S/ b5 n- I! k: H
part.move(@);-- load part5 R0 P, o! h2 i6 P
@.CurrIcon := "load";0 x9 |4 w+ F( {6 i
GlobalDistObj := part.globDestination;
( \3 `% ~4 \( d7 d0 e assignLObj := rgmanager.rgAssignL;. Z \7 W1 D- V9 y* }* E* X9 C1 a
row := assignLObj.getRowNo(GlobalDistObj);# ` V1 O; [5 S8 X4 j+ v
if Row = -1 then -- since 703 w9 f$ |$ ^# F& _- k
if lan=1 then
& y Z1 b5 I; m5 d4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 ]# |! O4 K7 T2 {+ V4 R2 y* ~ to_str("in der Andockstation: \"",?.~.name,"\""));
" M6 t/ O9 j) x m, I else
( r- q& |4 F% n( ^# U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 |: y5 r1 d e9 o. j0 _) { to_str("in docking station: \"",?.~.name,"\"")); " ~9 k- {# _6 K* x2 L4 f
end;$ f8 w2 V+ z8 V9 `& _( w$ @
else# S6 K' b3 Q7 e; a
@.Destination := assignLObj[1,row];
* T# R4 o6 V0 L0 _ I+ e I2 A end; + ]7 _4 q$ N% @2 j$ U* I
newDirection(@);4 s8 [. d# D' x1 h H
@.HasOrder := true;' t6 q: f4 ~& l9 ~) e
end;
% Y# \7 E6 o4 p* e9 e3 u0 N end;
* [: ]5 s8 h# g4 m. v+ y( {3 Yend; -- of the method
2 c% [0 h" p4 Q& P) h& I7 } |