/* called by: entrance ctrl of the object 'track'$ Y6 y0 v% u; v' @2 x! D! {
*// w! b# v) R, }
is' @( O1 d9 k# [( Z8 S# o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 _% I; Y8 u( H7 Q
do0 T9 L) i: [6 P
Lan := rootfolder.Internal.Tools.AOLlanguage;6 F5 j' A7 {5 y+ ]3 a
if current = @.Destination -- else return* r$ F! ]4 \0 m1 x8 j
then- B# u' q2 U! }/ H( ?
@.Destination := void;; F2 T8 a k k" ?( O
if @.occupied then
1 L( D- V! Q' w) } part := @.cont;! B) m2 M# q* q
@.transpOrder := void;9 S# y3 ^7 t, D+ F' K, E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \. o! c( r8 j; a/ f @,root.eventcontroller.simTime);
& a b. P# ]/ Z! r( W, i* b4 ^ @.HasOrder := false;
2 E5 l' J) t4 j! a" I @.DrivingHome := true;
' R6 L' j% U2 j6 d rgManager.tryToStartTransOrder;) I9 q0 G) r/ t9 M4 }9 d* y
if @.Destination = void) v) ^ J y2 O ]3 I
then -- no transport order for vehicle @
$ B8 H6 w- z' F7 u @.Destination :=
* x/ M7 t* }# Z4 D+ X$ Z rgManager.nearestFreeStation(@,track.~);
7 z; C+ v$ @7 `7 E, p newDirection(@); 3 Q" ~* a% i- [. _* X% T! X( B" ?. ~
if @.Destination /= void then/ @$ d8 }! T5 _' G, [+ }
@.Destination.NumReservation :=
) L t( ]6 e5 I2 \" C# a @.Destination.NumReservation + 1;
' J2 V. q: I- \+ X4 X6 a2 _ end;
. X, S2 e ^. E. D u/ `1 s @.CurrIcon := "drivingHome";! W. L$ T! O# _& [
@.DrivingHome := true;
, t! Q9 z, c" ^& ^ end;
- C) U3 O1 |3 m* N- i) X) `. ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ }, ^9 V2 e- d+ y, g) S6 Z
part := @.transpOrder;
: w0 a0 d, ?( o part.move(@);-- load part
2 i5 k; b O/ R% o2 V) o- W) } @.CurrIcon := "load";
6 O1 L1 Q) Z; ]/ D$ s GlobalDistObj := part.globDestination;! S1 I$ }% E6 ^% k9 c
assignLObj := rgmanager.rgAssignL;
/ ^8 z. Y$ Y1 `: \+ d, j% p row := assignLObj.getRowNo(GlobalDistObj);
$ C) V8 P9 l4 d if Row = -1 then -- since 70+ M% x" N) t8 i+ t
if lan=1 then) \; \$ o& \- T1 t1 N9 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y* D& m) k) Z! _ to_str("in der Andockstation: \"",?.~.name,"\""));
s+ D& O% p$ i, ?8 z else
) _! f& w* _1 R- e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 L( f: ~2 |; K r5 \4 Z4 |1 h
to_str("in docking station: \"",?.~.name,"\""));
1 N) l" O4 X6 h' t( J) q* X D1 v end;% N) O' o' l) B1 j
else/ A( d1 D+ F" y0 d; S
@.Destination := assignLObj[1,row];7 U3 s- b# g" e6 F* z( L/ U4 N
end;
8 {# j4 \' f2 g3 N newDirection(@);
0 N1 o# d" E9 n2 y& J7 a. H @.HasOrder := true;
5 B- O* y, k% ? end;
' L3 P S2 |+ t/ |& t end;5 K% O) G u( b6 y3 ?+ h
end; -- of the method
. _. z! S, u! f ~ |