/* called by: entrance ctrl of the object 'track'1 l$ _9 h6 H1 d
*/- |( S+ x& J# ]+ c. ^) r' x
is
9 O) R4 e0 c* O+ E0 T5 B( w2 x part, GlobalDistObj, assignLObj:object;row,Lan:integer; s& g: ]6 m# U' N6 Y+ P
do7 M# d; I4 b- M6 f5 G4 e3 R' o" l3 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;! \! J! `" q# ]& p( X
if current = @.Destination -- else return
/ X4 u1 N- l' \4 g9 k) y& ^ then% L% k8 N% b$ I: t) u' `
@.Destination := void;
( u x. i7 B$ { if @.occupied then' e1 b q$ s, K8 {3 n; @
part := @.cont;& S* b g5 J0 H: R
@.transpOrder := void;7 I0 ]9 K$ P _" N0 A/ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 R3 Q5 \& J- k/ k, X+ [! M4 ?
@,root.eventcontroller.simTime);
Z" \+ Y6 t, _9 G2 b! y% D @.HasOrder := false;
' c G W2 Y# ^7 m1 M/ x7 f6 \/ v l+ B @.DrivingHome := true;. |) f; }3 N j
rgManager.tryToStartTransOrder;! v" M/ U8 R: c1 o6 l0 I% w
if @.Destination = void+ c7 _9 F# C6 D( u3 b
then -- no transport order for vehicle @
9 E% n# i8 `- t" e) K9 ?5 u- ~0 {: p @.Destination :=0 g% ]* h9 R3 _2 K9 N6 P$ j
rgManager.nearestFreeStation(@,track.~);
9 U \# X! `7 ] E newDirection(@); 8 C- b8 F% O; t
if @.Destination /= void then9 Z" x _5 X1 u3 [" v8 U* F# G3 t
@.Destination.NumReservation :=
: s+ N j3 y2 w9 d3 r- T @.Destination.NumReservation + 1;
, K7 B: n- W4 K3 l8 Q { end;9 m2 i1 k- Z- z
@.CurrIcon := "drivingHome";& K0 _7 o+ T; k
@.DrivingHome := true;
+ K, c4 l- k0 U. ^4 d end;
: U8 D5 E. D) W% D @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station' j; n6 Y7 y) l9 o' m; N& O
part := @.transpOrder;( U9 m! c1 S9 ?" U
part.move(@);-- load part* g& @( Y: o& s" b8 c9 S' U
@.CurrIcon := "load";: P- b( O$ ]& v5 m
GlobalDistObj := part.globDestination;; }% F ^" r$ ] A( i! G
assignLObj := rgmanager.rgAssignL;
6 n# s; Q1 z4 g$ p& l) ]. V row := assignLObj.getRowNo(GlobalDistObj); f2 `, b4 ?. J; z) r- u
if Row = -1 then -- since 70% c. [1 t3 v8 f) b1 j& l
if lan=1 then
! C v4 c+ h+ g& A' _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
i l& c8 |6 n) e1 @' ?* }. } to_str("in der Andockstation: \"",?.~.name,"\""));
! S5 t& X* z# o2 n) G& f( w% {8 g else0 a) I% `5 L4 @) t% t U0 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! ?# b" S+ ~& F# G7 b9 E; {
to_str("in docking station: \"",?.~.name,"\"")); ; |9 N4 ^7 d' p) `8 r5 o6 d# d
end;
& o2 ~$ \* w( B, }# y6 v; {; E. A! m else
0 g: v, Q/ N1 p( I2 Q' H9 g! _ @.Destination := assignLObj[1,row];6 }3 C7 d! Q' \$ \% r; _) L1 m, S
end;
8 v" R0 Y# T; V0 t$ q1 \ newDirection(@);
, }* `; N0 i1 C( x7 C @.HasOrder := true;
! N( X, H! B) i: I$ d' \ end;" u' \# ]! Z3 \* I0 F( x
end;2 W2 J4 n: T8 ^- J0 r
end; -- of the method I6 l y' l3 s2 W. |
|