/* called by: entrance ctrl of the object 'track'7 X# y5 E3 t" [5 n0 u5 F
*/
6 M' t4 l' F, g) X8 _ S7 {8 |+ }/ qis
3 ^) A6 ?+ P; _# m part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 a6 x) @" z3 H3 u. F8 z: @& B
do
! {% e3 N. k$ a. N Lan := rootfolder.Internal.Tools.AOLlanguage;
' w) N: { `7 l if current = @.Destination -- else return
' u$ O) t" l; ^! q7 t6 T( l0 k then
- A* u2 O' w* L4 u# S1 v @.Destination := void;5 t _8 P( B% O1 z; {
if @.occupied then1 I0 \/ O) |- K" ~' z* o
part := @.cont;1 b& J1 {- Y. E+ J$ S2 d' B
@.transpOrder := void;! [! Z; t/ N, P( R+ u# R. u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# h! V" S& O7 k9 x" n( c5 G
@,root.eventcontroller.simTime);# R; Z- j- ]- f
@.HasOrder := false;
7 t6 p: R( t: E3 S8 p7 r @.DrivingHome := true;
) h9 R+ v" `$ M) e. S rgManager.tryToStartTransOrder;# }$ e) ]. m& t6 V
if @.Destination = void
8 t9 {1 X4 ^) y/ I/ Z/ l% ~9 s: x then -- no transport order for vehicle @
. G7 Q+ _5 q: q7 j @6 a' a( ] @.Destination :=9 N5 A0 t0 ]0 m* ]" }# l
rgManager.nearestFreeStation(@,track.~);
( _' J0 ^9 r: Q/ A" [ newDirection(@);
4 x% M" C6 z+ ` if @.Destination /= void then2 k7 t6 |: o Y$ h5 l! p% J. t
@.Destination.NumReservation :=8 e( Y) _ F. ^+ B) p
@.Destination.NumReservation + 1;
9 C, v+ A0 s& F" F end;
3 }/ ]& n# x/ j( k s @.CurrIcon := "drivingHome";, F! x o$ v/ `% x! Y9 [. z
@.DrivingHome := true;7 t: ?& Q i/ C- m
end;
% V6 B9 C# ]; }' J else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ S% Q4 L4 i) D; O# T+ ~; w, b; F7 n
part := @.transpOrder;
* }3 p- D; `, V3 N! V part.move(@);-- load part
6 U- u& j& f* M+ \( [6 G% @ @.CurrIcon := "load";
8 J" G! s/ i) ]. V- C GlobalDistObj := part.globDestination;
2 M6 V4 v2 a% }7 F6 k assignLObj := rgmanager.rgAssignL;( _, p5 n3 `; A$ Q. }
row := assignLObj.getRowNo(GlobalDistObj);- o# p9 o9 J+ k* Z
if Row = -1 then -- since 70( e3 i6 t5 q5 t( u- k
if lan=1 then- d' {- U9 n- Z1 H% u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% K" J1 j1 I U to_str("in der Andockstation: \"",?.~.name,"\""));% M0 }3 d- z: l/ I5 K
else
% G; }: R% R0 j2 e) ]9 `. P4 {2 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 ^9 G$ Y, ]$ M# W to_str("in docking station: \"",?.~.name,"\"")); - B, L. z4 \" x3 f1 P
end;# h7 P! y( ^1 d% d
else$ J5 d( h) K& s/ M; `
@.Destination := assignLObj[1,row];5 h/ o4 B* x6 s1 g3 C% R& s
end; H& F# `4 x8 Z( Y* a
newDirection(@);
3 N1 Y7 X/ ?9 @% S5 c# A+ n1 ~/ n) Q @.HasOrder := true;
. P$ a. z {+ k8 p0 h, V end;0 y- G! n# z7 C# h' H
end;2 s+ \" x7 R+ P D4 m: F
end; -- of the method
4 Q0 s3 c' m5 m |