/* called by: entrance ctrl of the object 'track'
( o; m; U9 v- a& F; P. Q5 v*/4 P9 e& p2 W) [: E" j
is
" U4 [9 P0 S5 t, v) P part, GlobalDistObj, assignLObj:object;row,Lan:integer;; ]5 E3 M+ c6 `; u
do8 c- ]4 O5 A' A# h& N! j
Lan := rootfolder.Internal.Tools.AOLlanguage;
) S. g1 q- g' P& ] if current = @.Destination -- else return+ M9 c6 Q7 `5 i% F* g! C
then% V0 m) L6 u: U
@.Destination := void;
- a0 t$ U) Q9 ^& D! [( p if @.occupied then5 p: Y, O5 {3 a6 n
part := @.cont;6 ]+ c/ d, ]: G" ~6 \& x
@.transpOrder := void;3 ?3 ~8 [! |2 h/ H* m# m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 t* k( ^ y8 R% C5 `* i @,root.eventcontroller.simTime);
, v6 U' B) ?/ W5 {* w! [$ w, C+ L( x @.HasOrder := false;" F7 o. P% ^* i* h6 D7 D$ N
@.DrivingHome := true;
' ], p( Y( G3 C% ` rgManager.tryToStartTransOrder;
% ~- p8 o! U) N6 | if @.Destination = void
0 g; W6 ^1 U6 ~1 W" a5 |3 @& g then -- no transport order for vehicle @
2 b# T7 n, a& {9 r" w; T$ D( L @.Destination :=
' G2 f2 c/ n9 X rgManager.nearestFreeStation(@,track.~);: o3 d- v. F2 Z5 D9 q
newDirection(@);
- o/ x. Z9 _ c# U, ? if @.Destination /= void then! q; q9 T8 r5 D5 P2 \* ?# b; h& ?
@.Destination.NumReservation :=
. g2 a# \( a0 j f: k0 [ @.Destination.NumReservation + 1;
' f$ T$ ~+ l8 @' V$ `( p: T f end;
% s" U) ~4 P* }$ w% R, K @.CurrIcon := "drivingHome";
, X% R5 x' Q6 F1 L+ n: Q3 y @.DrivingHome := true;
! H1 q1 P" K) K$ A. z3 _! X# { end;2 i7 P8 z% e* t5 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* F) Q5 I2 M& G Y) r# n! Y part := @.transpOrder;
! j/ W' n1 t7 G part.move(@);-- load part
4 t% l; _! j6 p' H @.CurrIcon := "load";! B# E, n) Z- ^1 r
GlobalDistObj := part.globDestination;
* V/ G* \1 r* f4 K8 X assignLObj := rgmanager.rgAssignL;
7 [- M( \' T: \2 s row := assignLObj.getRowNo(GlobalDistObj);
/ s* f5 J* a0 U if Row = -1 then -- since 70. r4 }, L4 p | O! L
if lan=1 then
6 X& G3 P* b, l7 c2 r$ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C8 c9 g* M" j6 M; o* _/ ]5 p to_str("in der Andockstation: \"",?.~.name,"\""));$ {) Q" X, r% F" a7 I; _
else
) ]- O9 @* F8 z4 `4 C) ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ~" C3 \/ W( a# G to_str("in docking station: \"",?.~.name,"\""));
* r% U j7 r" b# T end;+ g) F, F2 K" w/ x- g+ P
else& @! h3 e/ _4 f
@.Destination := assignLObj[1,row];
) n, Y6 b' ]& B8 E9 l4 y. Q end; 9 A! A% b6 F) w+ @. ?
newDirection(@);
3 ] B! N* P+ l2 Y3 T% I* q- B @.HasOrder := true;; u. p8 e1 `" m# \0 x* n
end;
! e9 R* {) w7 d end;
) [. v1 w- {+ Y2 A$ T5 Q9 ~* ~end; -- of the method* i! }6 I6 h& E( \
|