/* called by: entrance ctrl of the object 'track'
" _' T: E4 v8 A( h! h' O*/. @7 N. @- @+ h J1 Z+ I' q7 U
is
, b! g4 p2 I0 d7 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;& p) v3 q% V' l) W
do- p. A4 Z1 v* \
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 e& U: M4 Z4 _1 F. z" z' l if current = @.Destination -- else return
6 D' B6 ~" `/ K/ R, j. P* e then6 Y8 }* A6 H7 D$ D& y
@.Destination := void;
) \ L# x6 \# N+ X8 D# z, z if @.occupied then
& M8 Q# d4 ]$ K part := @.cont;; @0 B% o& C4 [/ t9 M
@.transpOrder := void;
/ x! J6 m7 X8 q! U* x7 W0 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) e* J% j0 { k+ f1 [; W @,root.eventcontroller.simTime);1 S# _& N( T {6 |# \
@.HasOrder := false;- `; m' U: T: u; t; W- p, m4 u% W& W
@.DrivingHome := true;
? v/ z" n; w& Q% J+ ?: ~+ O rgManager.tryToStartTransOrder;
$ Z0 c) x, X u @3 }9 o0 x/ | if @.Destination = void4 c# d$ C' k5 y5 [$ q" R
then -- no transport order for vehicle @5 ?1 ?$ W# U6 @, U: F' c
@.Destination :=% A/ b2 i1 p0 a/ I" k& k9 n
rgManager.nearestFreeStation(@,track.~); @, J O% a6 t+ u0 q# U" n D
newDirection(@);
: p% F$ W; s/ p; ]2 m6 X: s if @.Destination /= void then# Z0 a# U/ x# j; m K7 X
@.Destination.NumReservation :=
; D4 y3 Y# U9 ~9 ^& ~ @.Destination.NumReservation + 1;( i6 h" c0 t$ K
end;
# b" k& ]6 D: z/ b8 Y7 \" o* ` @.CurrIcon := "drivingHome";! K% K) S! u+ a1 p7 o
@.DrivingHome := true;
3 v& x4 y5 Q6 N end;: D, S! x, ~: |! x0 X5 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ L j+ v+ f* Z1 @* a part := @.transpOrder;+ x1 K( o# P `0 Y& I8 o; @/ i
part.move(@);-- load part
. Y6 c3 v/ d( M. B7 p5 s) ^ @.CurrIcon := "load";
, U$ b; F# ]% c! e- Q' a GlobalDistObj := part.globDestination;
" c' S9 {# I/ B assignLObj := rgmanager.rgAssignL;% ~( E% @; X( N" m% e
row := assignLObj.getRowNo(GlobalDistObj);
$ {8 a) M4 W H7 K, X$ _1 T if Row = -1 then -- since 70
* |. f8 @. V! s+ B0 T! M6 G if lan=1 then
4 H# N( W# T# Y# {1 A6 |) n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# h0 l; {. O; H" u! {
to_str("in der Andockstation: \"",?.~.name,"\""));
9 G1 x+ o, [+ y! [( v. |" C2 ` else
) n: |% P; S+ j. x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, v. D/ f, [ |* `# W7 a to_str("in docking station: \"",?.~.name,"\"")); % Q# E& N* y6 d6 L
end;
5 X0 ?; j+ s* L. C2 s h k else
! z8 Y% Z4 x: _- L3 j% { @.Destination := assignLObj[1,row];. N W: ]: N# J' f
end; ) _6 _. ~9 ~. M. e
newDirection(@);, p! T4 W3 M1 B" @. k0 u0 `
@.HasOrder := true;
+ L% A0 Q& d6 v9 T& U6 q end;
# l- E! i$ o# p6 z n1 p end;
! K* b9 d( |- J: |end; -- of the method
x5 f% P. ~5 A0 D) Z8 T+ H |