/* called by: entrance ctrl of the object 'track'
# i, K6 e5 a7 L4 ?4 E" J. q- J*/9 m; t% I* Y) p2 d6 o
is+ d/ ~8 Y; o% D$ g, V; o. w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 p4 a$ U' w5 u8 ^" f
do
/ P+ u$ K. f- J) P. x! p5 V Lan := rootfolder.Internal.Tools.AOLlanguage;% w' u* ^2 M! B
if current = @.Destination -- else return, v3 U( F& k4 p3 E5 @
then
' Z4 P: h: M2 _5 g @.Destination := void; K3 ]' T% }9 ~9 t) ~2 G
if @.occupied then
5 \* W6 @% H! Q ^1 @ part := @.cont;3 g7 V" G j) I& r
@.transpOrder := void;
; n" ]2 ?/ |) V; ~0 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- V) B& f8 m9 I
@,root.eventcontroller.simTime);
& K+ \, W; j4 C( \% R. V @.HasOrder := false;
7 \0 C2 I; i+ M @.DrivingHome := true;
/ c9 `# ?- m: x/ N rgManager.tryToStartTransOrder;" f( d9 f+ g. f
if @.Destination = void/ z. q I! {0 @! }2 }
then -- no transport order for vehicle @5 U$ j( R8 Q2 ~
@.Destination :=
+ f! b( |- @8 e9 \; u* p rgManager.nearestFreeStation(@,track.~);
$ i/ |5 c6 }3 D newDirection(@); ' F R+ u) R3 b
if @.Destination /= void then
4 `5 M( `' T1 o! j+ B6 Y" m+ S; M5 B @.Destination.NumReservation :=! _4 [/ B1 C; u& O4 @
@.Destination.NumReservation + 1;
& b$ Z' q: N2 E) ], V end;! _, y' m: ~( h7 s+ y. H( ^, a: x* r
@.CurrIcon := "drivingHome";
' g! P3 e1 R$ p' c7 K8 W @.DrivingHome := true;+ U1 W/ q/ U9 L R
end;! d" Z2 c' ]! J( {' l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" y0 v2 m+ d9 A: Z3 x! b# Y
part := @.transpOrder;" f: }/ {7 Q4 u0 r! B# |
part.move(@);-- load part
0 D! m$ h" d: ?4 ^* W- e @.CurrIcon := "load";9 Q" G5 I. E# W' x
GlobalDistObj := part.globDestination;; y* u6 B7 Y( [& {* r
assignLObj := rgmanager.rgAssignL;" @0 \2 D2 P/ N4 m% K1 J
row := assignLObj.getRowNo(GlobalDistObj);" I8 o1 C- U( u
if Row = -1 then -- since 70
8 G% Q% x% ?) G, X; S- ~% H if lan=1 then
5 P# w$ k8 f* o) w1 i9 |1 L+ |" |; v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ j% t9 {- N3 W- N' V to_str("in der Andockstation: \"",?.~.name,"\""));
6 X1 I4 F1 @$ F! n( c) e6 \# l else
S/ B6 R0 o0 O4 w3 j2 n3 `9 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( C* D1 K5 b# K9 r" \4 V to_str("in docking station: \"",?.~.name,"\"")); % q. d+ @/ ?$ W" I |# H& z- X
end;
, d5 b6 n6 Q% Z+ ~ else# N. F& E% V v/ I- a
@.Destination := assignLObj[1,row];
/ k4 b0 N- h* @& ?6 p end;
# n) J9 a! c# D% n/ [1 x% A newDirection(@);
* `9 F- p: z/ _& p. `5 w @.HasOrder := true;
8 t% v- J, Q" G( s end;, h A! I3 Q3 I. G
end;
$ X- d7 [- Z* A# H- @5 wend; -- of the method
/ K R7 G8 \6 `" x6 P% d2 B |