/* called by: entrance ctrl of the object 'track' V. O. d& e3 b9 I0 z; }- r
*/0 X! V: V# K7 H+ y- y+ O' t; r( s
is$ t# A, B& U' q7 F) b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& O D$ g) d5 e& Xdo
/ a2 H8 y0 ^. @3 a2 D% N Lan := rootfolder.Internal.Tools.AOLlanguage;
2 E' S, y5 q! [0 K if current = @.Destination -- else return; F+ V. b4 H( W: H" b4 s( T
then
L, a9 Y' W+ v0 S6 W3 T @.Destination := void;/ ^/ S( B" `7 z, q) v
if @.occupied then) j6 j: u& a: S$ M$ J
part := @.cont;3 ^7 b6 \0 T/ M; u5 |. x/ a n
@.transpOrder := void;7 Z- x6 v/ R7 o4 J0 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% v% ^; _+ n8 O3 C% w @,root.eventcontroller.simTime);1 G2 L; i/ V- Z' Q3 S2 E' i
@.HasOrder := false;8 c$ V& K: i# h8 N
@.DrivingHome := true;, Y+ K( H5 N9 d5 Z. C
rgManager.tryToStartTransOrder;
) c/ q4 j& X: \+ N; } if @.Destination = void0 q. H; a& Q; U- @
then -- no transport order for vehicle @9 D( V- v( d4 J2 j% s
@.Destination :=0 |$ u1 j7 W1 K$ u
rgManager.nearestFreeStation(@,track.~);/ F5 p5 i) t. V# X7 O" W7 ?2 |
newDirection(@);
, k5 W$ L9 b+ ?: w6 X) H if @.Destination /= void then0 T) T4 B4 J# d7 h3 K$ K8 I+ O7 H
@.Destination.NumReservation :=
1 _. ?1 h; j. ]2 f @.Destination.NumReservation + 1;" }7 a- G4 C9 R/ G; \, e3 n3 L# G
end;: Q" A/ c& R- I' y* Y
@.CurrIcon := "drivingHome";9 ]: ~4 r! F7 h" q* r! I! M' p" {) q
@.DrivingHome := true;$ L7 W. W4 D3 }5 a$ t \
end;
5 W7 `) Y* ]8 T+ L3 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' C" |/ u( T% B part := @.transpOrder;
, L: O0 n, T% X% U4 ^ U part.move(@);-- load part5 N+ P1 R" Z2 ]
@.CurrIcon := "load";2 ?4 @4 R0 Q$ Y6 N5 B
GlobalDistObj := part.globDestination;! y7 p1 z3 {% i
assignLObj := rgmanager.rgAssignL;3 ?, |2 c2 O% U
row := assignLObj.getRowNo(GlobalDistObj);
) A, i& N! @6 f if Row = -1 then -- since 70
( }& N4 b9 }4 K6 H7 n, I if lan=1 then
8 ?: \5 B: O1 L- M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 G) s6 G; s; o4 i+ x to_str("in der Andockstation: \"",?.~.name,"\""));, F+ ^, s1 i2 Q, y3 j! O2 T
else9 r# L( Y' E3 t; h/ x. o) Z" L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {7 J) m; p% ?! V4 W- C% ]( x0 x to_str("in docking station: \"",?.~.name,"\"")); ! f8 Z3 ~& t1 a. L4 P' N W
end;
. ^ g7 p1 n( `* a6 Q. j8 E else5 ]+ s* c% S" x# i
@.Destination := assignLObj[1,row];
( W( f' ]7 q i end; % D* E$ f/ p& i4 K7 c! j- Z
newDirection(@);7 N# g; _. [* w6 O/ c h# G0 q; w
@.HasOrder := true;
& k( c D7 L9 Z end;( q+ L# r* O/ A8 R) p, m
end;
& v4 F+ f- P" O& n* u$ U# Iend; -- of the method
) T+ p4 ?+ i; g7 k3 O |