/* called by: entrance ctrl of the object 'track'
0 F# f1 B, F& b6 D*/( D! r4 O" P P8 I/ B
is
* M+ {9 q' ^2 n; U part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 H3 Y- x4 a, ^3 ?+ v- u1 h% m6 L3 Y
do
" |, b* k3 v# ? Lan := rootfolder.Internal.Tools.AOLlanguage;
; J" Y( G6 L2 m/ ^8 Z! {, [ if current = @.Destination -- else return, e, q9 }" t7 R$ c
then* O% \' r, g- u( w, Y. T: A" m
@.Destination := void;6 C5 n; o! x% D4 h W
if @.occupied then3 e N! x; f L: ]! u- n7 n7 A
part := @.cont;0 h9 ^6 p9 M" O6 {
@.transpOrder := void;
' c5 u' ^# g, U9 c& \9 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 ]$ h# R+ p" w. a/ `) G1 t
@,root.eventcontroller.simTime);$ B3 D& k0 ?' p0 u) z: m
@.HasOrder := false;
7 F/ B7 {5 n7 A _) ] @.DrivingHome := true;
A0 I9 o+ _& T0 _0 ` rgManager.tryToStartTransOrder;5 r2 ~9 q+ z$ s# j3 C$ N6 U# O
if @.Destination = void5 u" n, I6 y+ ?' |
then -- no transport order for vehicle @' l: R4 d2 _0 {/ W P
@.Destination :=
- G, J% q' P, x* B rgManager.nearestFreeStation(@,track.~);
+ {$ D& L& q5 I4 `( p newDirection(@); ) m; m2 \+ d# q. T) [3 M
if @.Destination /= void then B9 p; M# R9 r4 s4 e+ G
@.Destination.NumReservation :=6 J9 b9 T* u- k0 N
@.Destination.NumReservation + 1;* Q) I% P( M f S) f2 I9 h8 z
end;- Z* M7 k) @8 k6 b7 J
@.CurrIcon := "drivingHome";
8 [4 ~5 \8 `, m. h @.DrivingHome := true;. s M, G; P$ J4 M) T* j2 @
end;2 r- A( s4 f Y! S. H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 P+ ]% L. l! M+ g+ a2 E6 @
part := @.transpOrder;7 I! R, F; G3 u( b1 E
part.move(@);-- load part( A5 @- F1 }/ |% I
@.CurrIcon := "load";4 S% Z3 W0 |5 I$ j0 {2 o6 I
GlobalDistObj := part.globDestination;5 m& w2 v8 p+ e" s3 {' H( P8 P7 o" T
assignLObj := rgmanager.rgAssignL;5 ~5 e) Y" D# I" ~( R" l: K$ h/ H# n% h
row := assignLObj.getRowNo(GlobalDistObj);
0 t( Q6 M _( v8 ]# H/ t if Row = -1 then -- since 70
x7 ]9 l! Q" j p8 o5 { if lan=1 then/ @/ _; ?2 h9 P( I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ q. B6 h. [3 B
to_str("in der Andockstation: \"",?.~.name,"\""));
) V; s+ x) l& M, R+ O9 p5 x else
9 w% h4 _& @7 b' i. ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 y1 q/ a' ?2 ?% r
to_str("in docking station: \"",?.~.name,"\"")); & S3 u' A' |4 Q
end;+ X1 @( o/ K& [4 e( }
else
' G h! U, t8 e* S2 s @.Destination := assignLObj[1,row];
. i; f/ y/ y- `5 h. B end;
5 k# O; {. k2 _, F* S newDirection(@);& f" y) t& W$ c
@.HasOrder := true;
4 s! `$ S, Y: l0 V end;
# {: p* L$ ?) O9 Y v" U end;
1 u. S9 H# y! ]! ^& J4 Tend; -- of the method
$ y6 c- j7 V2 Q! B; R+ u |