/* called by: entrance ctrl of the object 'track'
) b7 ~$ W1 m5 [" M2 X8 G*/
' z+ z" l* B! I# T7 f2 E+ A% K8 Mis
/ m0 ~. w. C( }5 }6 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 q" O) Y1 ^6 F& k4 \) t1 b
do6 b4 w( `% M, P3 R3 S$ c+ N
Lan := rootfolder.Internal.Tools.AOLlanguage;% G+ ^# b0 G% S
if current = @.Destination -- else return) j- F7 J1 j! x8 S4 N. i0 z2 l
then2 Y' h8 w7 P' a) ]
@.Destination := void; X& z2 F' ^1 f" q( @3 a
if @.occupied then
* W7 b2 T8 A9 S2 O; D part := @.cont;2 F3 [4 e2 M C7 B& I
@.transpOrder := void;! M) n6 k2 E; y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: }% `. q6 Y( f' i
@,root.eventcontroller.simTime);
4 _& o$ P# ~/ \% D8 F+ S' |2 y @.HasOrder := false;3 f: m$ V/ `2 \$ P
@.DrivingHome := true;6 M* L3 A4 W/ U, O8 D
rgManager.tryToStartTransOrder;3 y3 }# ~9 n' @& r ~/ y
if @.Destination = void/ O! A2 _2 _+ u3 `) K, Y1 ]
then -- no transport order for vehicle @
! t- ?5 f' q3 V7 z" ? @.Destination :=
1 F1 O" Q% ~4 l9 P5 G rgManager.nearestFreeStation(@,track.~);
1 {0 r& D0 S+ ]" e newDirection(@); T' p5 b1 t6 g/ ?+ m, E
if @.Destination /= void then
; s! a, i y! M @.Destination.NumReservation :=% o4 Y k" R9 V
@.Destination.NumReservation + 1;3 N" A* f" ~* d# Q0 q
end;0 x" y5 Z! j! a% Q. T, ?
@.CurrIcon := "drivingHome";+ f8 q# R$ {8 ?( D
@.DrivingHome := true;. m8 w- A9 i$ z! E% z/ |% [$ K: ]
end;! y# ?$ @; r$ f2 F+ D' S4 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; c- ?( n; o6 u
part := @.transpOrder;' f; \; `! m9 k9 t" u
part.move(@);-- load part K1 |) D1 t1 W
@.CurrIcon := "load";
0 o9 F- k1 N" ]7 w GlobalDistObj := part.globDestination;
" e$ X5 @2 ?0 Q" ^ assignLObj := rgmanager.rgAssignL;0 @; u4 \8 z8 x. U3 x; b( h6 _0 g3 C
row := assignLObj.getRowNo(GlobalDistObj);
. k' k5 v% @: ~" S if Row = -1 then -- since 70# t |$ Y. G, T
if lan=1 then0 W: F& _. M- D* }- q: F' F. T' C' H& |5 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 n# V+ {! J! A' l/ ^3 o7 T9 _1 s
to_str("in der Andockstation: \"",?.~.name,"\""));$ u' F# B3 R" B# ?& h
else
- u9 j# s2 C# \" h9 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! M$ b% w" L! x
to_str("in docking station: \"",?.~.name,"\"")); * M/ [! ]2 v; ], Z
end;
1 b) S$ [" q9 F/ A5 Z6 C else& Q' l3 [* ]4 t
@.Destination := assignLObj[1,row];' I# ]% S6 j6 `1 ?- R4 ?
end; & k/ H. l1 w2 d6 {" k* q
newDirection(@);8 h! m; }7 f x+ s( C. P
@.HasOrder := true;% p/ K- ^3 M: N$ R4 O& I
end;$ O. B) F& T. r1 {6 q5 \
end;
" X+ L2 r) N! l$ x& a6 O3 y8 F% l/ aend; -- of the method
) w: g' d5 g; w, L4 w' N |