/* called by: entrance ctrl of the object 'track'
) s( }& a0 T, }8 n1 E3 z6 q*/
0 N, o% k- b& ~% m. l* iis
7 S1 L, Q8 W: O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 \1 v& T( w8 G, _- X' v$ o, cdo
/ g2 P: m, I8 ]. C/ }' W0 K Lan := rootfolder.Internal.Tools.AOLlanguage;) [# \3 }6 X$ t+ E9 M! [
if current = @.Destination -- else return
3 c5 A. f3 _, C I1 R8 \/ Y then
# g4 p. s& I3 y% V @.Destination := void;3 J1 t7 i9 y$ R
if @.occupied then
" K/ s, ^$ _ z/ K/ c part := @.cont;; d9 \, G1 D$ X( w) n4 i. [
@.transpOrder := void;. g5 O5 O6 F( o4 ?! q+ H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 _- W) `# O5 ~9 Q7 E% Y/ x @,root.eventcontroller.simTime);- i4 Z6 `9 f/ K3 x3 R
@.HasOrder := false;6 u! _* U$ |5 Y2 v) {
@.DrivingHome := true;; f# @- S! j5 P" q% O
rgManager.tryToStartTransOrder;6 ^" w/ i1 X+ Z7 Q: X
if @.Destination = void% M3 P l% b# f+ t& M4 `
then -- no transport order for vehicle @$ G3 l; K' `$ e& ^
@.Destination :=+ ^- o6 t; u* Q* Y) V8 I$ Z; q+ Y
rgManager.nearestFreeStation(@,track.~);
! A9 d$ N# G2 R+ Z. Y' `( @ newDirection(@); 8 ?9 q, ?; F+ C; I. l: _
if @.Destination /= void then
( A3 M) s) K+ r @.Destination.NumReservation :=
4 |: X7 |. H) l' B/ i% L {5 C @.Destination.NumReservation + 1;
; F8 D, V: e. L. `4 Z6 f end;5 z6 t6 g& A; }. A! S5 p
@.CurrIcon := "drivingHome";6 X' K F; O# L
@.DrivingHome := true;
! L3 ?( b: w0 E: Q) p end;; S; x6 S' J0 q9 ~! E B& ?& ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; m$ {3 Y3 t: E7 q
part := @.transpOrder;
+ Y' F& l7 S4 F& l7 E part.move(@);-- load part
' v* N, i- V6 f @.CurrIcon := "load";- m$ h2 M! _! F- s" [
GlobalDistObj := part.globDestination;( _* r" K3 H/ F2 |1 w" S! F% Y1 W
assignLObj := rgmanager.rgAssignL;
+ a/ }4 K4 Q. v0 T row := assignLObj.getRowNo(GlobalDistObj);
$ R6 Y1 m# _; {2 J6 ~# _. O if Row = -1 then -- since 70
; |$ G( H) e' x& {$ H0 M" j" O: T if lan=1 then
. J: L" ~, ?0 q( B. K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 \6 s$ W: q/ f# }9 k; b6 N& R+ ` to_str("in der Andockstation: \"",?.~.name,"\""));
+ Q; d+ p; Y1 {+ r( M- M$ U! r else
+ Q2 o6 z S2 L7 \! X m( Y7 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 r# b8 z0 l- M v3 J5 K! T# x
to_str("in docking station: \"",?.~.name,"\"")); $ Z5 ?" m$ G$ n2 P7 n* _2 n
end;* Y# h; y$ G- ^ j- q
else
, D% l. }* G! T, U$ W7 B( v @.Destination := assignLObj[1,row];3 t5 |$ |: v+ w& n1 @: s
end; " x! J, J& X g# P/ I3 A2 M' s+ U
newDirection(@);1 @4 e8 K5 N( W# [2 t
@.HasOrder := true;
4 j0 K Z- @8 Y- m end;
( I7 t. f- x& F. X4 O end;" }; Y, D9 U/ K4 l" |$ q
end; -- of the method
+ }% @3 |! H& n |