/* called by: entrance ctrl of the object 'track'
+ R6 F9 D1 |% I4 ~$ n* q7 H*/
& d, C4 t1 N0 d! j2 Eis, K% e7 Z% a; E% H" G* H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o/ q4 a0 q" i7 r+ C3 N. fdo
9 K$ K! h/ ^& e) b" [ Lan := rootfolder.Internal.Tools.AOLlanguage;
0 k( o* \" k. Z3 _& }. I: w if current = @.Destination -- else return9 p/ F3 o- {7 } Y- i. ?5 e6 k
then/ V4 I% ` f5 P0 v1 Z% G8 o
@.Destination := void;
1 A9 n f* Z6 k; |9 u6 m7 i& C if @.occupied then
( @! [4 f( X# ]* [+ D% R part := @.cont;* z/ f* I1 {1 S
@.transpOrder := void;
9 W* Q" n8 X" M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Y. b1 ]- `2 | @,root.eventcontroller.simTime);7 Q& ]; T5 h+ Q3 C
@.HasOrder := false;0 N ~% `+ d8 a8 M8 v& j6 X
@.DrivingHome := true;
# p% @0 v7 r/ Z rgManager.tryToStartTransOrder;
0 x) V, E, ~0 N4 p6 r! U: ] if @.Destination = void
' V8 R/ B9 i5 F ]% e/ v2 g% } then -- no transport order for vehicle @6 u# Y4 W2 [4 c+ `# m
@.Destination :=
6 G6 |" a1 [& t, [ rgManager.nearestFreeStation(@,track.~);4 `6 R" d0 e6 K; [; J! `
newDirection(@);
1 o! G$ v3 h0 s if @.Destination /= void then6 q: C6 @4 ^+ Q3 b* U
@.Destination.NumReservation :=
( [& h. @2 A( ^3 e: \) ^5 x, z! Y3 \ @.Destination.NumReservation + 1;8 V( H' y7 Y1 Q$ u. g
end;
0 e+ Q7 k. _! W @.CurrIcon := "drivingHome";
0 {2 h% j( y0 { @.DrivingHome := true;
: f6 _, p" F0 O" {" e' w end;1 R# g Y3 Y3 U( x: i& B9 i/ ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 V; ~( R* Y( e6 g' a part := @.transpOrder;5 E( `4 t' T% r5 A8 R2 A
part.move(@);-- load part; K5 t/ m, G' Y2 ]
@.CurrIcon := "load";
' Z2 `2 G; \; b" q7 n/ n4 [. H/ n GlobalDistObj := part.globDestination;
/ K5 Z+ X$ l! c4 r" n3 y: p assignLObj := rgmanager.rgAssignL;9 ?( n9 J9 d, T
row := assignLObj.getRowNo(GlobalDistObj);
1 l8 P5 C* c& j. k" u& F3 C6 X if Row = -1 then -- since 70
* D; x9 Z% C0 N7 A+ d- r! |! S if lan=1 then
" i& j+ D- q- M: d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; U0 h6 l0 q, ?6 r/ V to_str("in der Andockstation: \"",?.~.name,"\""));
! j+ `, F1 @: F+ X" q* y; a; D else! i ^; | m9 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ T8 Q. f" E2 f9 H
to_str("in docking station: \"",?.~.name,"\""));
, W! _& T" h' _/ S end;/ k* T( {3 x/ j- L! q. g
else" q( b n/ ]7 O7 a
@.Destination := assignLObj[1,row];
0 p4 `/ F- h6 s% e3 k end; 6 M, \2 r' F- i. S2 D! {
newDirection(@);8 I6 Q, u) L2 n2 r$ i
@.HasOrder := true;
# Z# d1 I$ z6 T8 z end;6 b: r1 }: M# T/ v7 j8 f. m
end;7 p f6 |( F4 f$ W# n. A; X
end; -- of the method
( J! Y( h9 o1 J% U; }+ p) u5 @8 l |