/* called by: entrance ctrl of the object 'track'
* e T+ O; M" M- ~# K*/
& p* N5 p) W4 R- T& Pis
, S' }0 v" `( J8 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- b/ N; T! F! J8 m1 Cdo
% R: I9 ]9 J+ n% _ F$ S Lan := rootfolder.Internal.Tools.AOLlanguage;
2 D+ U' Y% {8 C% o9 ^3 |$ M0 J! p if current = @.Destination -- else return
' x# C$ t# y2 q0 u& ` then$ n5 O/ H3 t. ^" n
@.Destination := void;1 D. w8 {% m% l
if @.occupied then; R7 Q* T8 L9 n7 e
part := @.cont; c1 q* h4 p% l2 q9 I$ t
@.transpOrder := void;
* i' a6 |1 u3 R% o" B* Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 |' ?8 U. _. y! f: g% n2 s/ d8 v @,root.eventcontroller.simTime);9 E9 l" Y6 }2 n5 q% E. @" h
@.HasOrder := false;. X+ z- _1 f6 J, ~ u. A& J; C9 ~
@.DrivingHome := true;
3 t! k. }- s2 ^2 N" b rgManager.tryToStartTransOrder;
: _8 y& S( Z. e! H1 i8 c" b if @.Destination = void/ ~5 f; K* }- E0 [+ V+ {% p2 L" m
then -- no transport order for vehicle @
I$ Y; \9 q6 Y @.Destination :=2 G" i& C! ~& \) g
rgManager.nearestFreeStation(@,track.~);0 Q0 p6 i5 m/ k* n! T
newDirection(@); H$ k% k8 h8 o- p
if @.Destination /= void then
+ G; J& s3 J% |$ ~% \ @.Destination.NumReservation :=# g* [ E8 \* p! |/ \) B& U3 g
@.Destination.NumReservation + 1;9 O ~1 F, \# I1 k: Z' p9 J1 \
end;% i* ?* g" u+ s; q
@.CurrIcon := "drivingHome";
* f( W) S: X% w R @.DrivingHome := true;
; W" R' V4 [7 r, t4 d0 N5 ~ end;
~$ |9 `9 a; E K8 i1 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ^, l/ G! O- b/ n- g part := @.transpOrder;& \0 @0 E4 Q e3 z1 C
part.move(@);-- load part! Z& k$ R+ y9 H" l' p( x5 C/ |/ s
@.CurrIcon := "load";4 F& e$ O8 @& {9 t- ?
GlobalDistObj := part.globDestination;5 }/ M2 E6 ^& ]+ h& d
assignLObj := rgmanager.rgAssignL;
. V) c$ t% I% S% o, N row := assignLObj.getRowNo(GlobalDistObj);" x8 ^/ \. a, I' ?3 s2 \: p4 S
if Row = -1 then -- since 70* ?1 W9 z8 f; Q: ~. C" p" e" n
if lan=1 then
9 g. o& h* F5 p0 V7 ~4 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( C! I8 e; Z( s) ]. a$ w to_str("in der Andockstation: \"",?.~.name,"\""));: G1 ?# s$ ?1 o- O* w/ d& V% ~
else
& g% z6 P" Q: i# u+ c; a/ |& u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), O( H& `5 U, Y
to_str("in docking station: \"",?.~.name,"\""));
7 w+ G0 `0 U: P5 D: \ end;
& S, e0 f4 D* {7 T else1 e" V$ @; ^: i: z# P
@.Destination := assignLObj[1,row];
7 }8 i! ? A& H+ P end; - M7 R; U3 | @" F8 G# R4 G( s) r
newDirection(@);
. O3 ?$ t: X/ Z @.HasOrder := true;% G6 g( \& R" O4 F
end;8 W# I! s8 L9 w0 G" _
end;7 U) i4 T1 g; `' _; A, o
end; -- of the method
, R$ w4 Z, d% ]6 c t |