/* called by: entrance ctrl of the object 'track'
/ q% v; [5 d* I8 A*/- e# {+ \: L2 h1 L8 a0 P
is9 k1 M0 R7 o0 O! @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 [9 c% Z4 {6 ^9 e- w5 c% B5 T, Ydo
0 s2 X; j7 X) i& w# ?4 g Lan := rootfolder.Internal.Tools.AOLlanguage;" F% G/ t4 X! V5 i6 `7 K; [
if current = @.Destination -- else return0 k* T! n. v$ D' N- @
then
# A+ \8 p t& q+ c, G* Y4 J @.Destination := void;* C$ V7 p- q8 b+ c6 B: f4 F. R- i6 e
if @.occupied then
/ J% {' _1 f. J9 I' n part := @.cont;- W' F9 B. x& |6 [: U" C
@.transpOrder := void;
/ u) `! n# e5 @1 f, w/ k2 w: { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) W/ Q; J9 f3 u8 i) ~$ F' m- ^- \
@,root.eventcontroller.simTime);. ~* @* q+ c0 v! |( R6 `) L
@.HasOrder := false;
% b" B6 L4 @+ H1 j- h) Y @.DrivingHome := true;- x z$ }; ^" I4 u( c" n
rgManager.tryToStartTransOrder;( k5 Q) L) X. k- l8 x
if @.Destination = void8 X" u% a3 i( s4 f" H
then -- no transport order for vehicle @1 s! h$ [# k( Z2 V$ F
@.Destination :=" y' `7 _6 x2 M/ o. ~& b2 {: o
rgManager.nearestFreeStation(@,track.~);" h, [& W$ g* W% R9 n# P
newDirection(@); 6 C8 A: f" ?( ]) N2 M
if @.Destination /= void then
' N0 f* Z) @' Y8 m4 U, W1 P' c( b @.Destination.NumReservation :=
% g; p. T2 r" \6 g5 y1 O% w @.Destination.NumReservation + 1;
- Z b& ^7 K- E* N3 [ end;
4 R* c1 p) ^% h, `7 S @.CurrIcon := "drivingHome";
8 N4 r4 g4 N+ o6 b8 T0 F$ i* ^$ ] @.DrivingHome := true;
- U. V' }" j9 D4 Q1 _* {/ l end;6 ~5 |; t/ y% k+ c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Q$ L2 `/ q/ a4 U$ v, ] f part := @.transpOrder;+ a' x6 l4 i. ^$ g1 G& B
part.move(@);-- load part T2 Z( _! f9 S+ I, ^# Y- f! Y; m
@.CurrIcon := "load";- c8 m4 S9 g& I' p: Y
GlobalDistObj := part.globDestination;4 h* S' G% O: R% E& H
assignLObj := rgmanager.rgAssignL;
/ U5 J7 ?8 P t9 E' o2 q row := assignLObj.getRowNo(GlobalDistObj);
$ E, ?, }$ X5 @$ G if Row = -1 then -- since 70; J C t6 T- w. U9 Y" K
if lan=1 then- @& N% }- p3 F2 b2 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) z% W$ v; v; S7 Y: s: O
to_str("in der Andockstation: \"",?.~.name,"\""));
& v1 q/ m0 r$ \2 n( u: H } else9 F8 K/ k) A4 C# G2 {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( z# k# u8 _# k% L5 b to_str("in docking station: \"",?.~.name,"\"")); 4 [. t, O# J6 u3 J+ E, ?7 M! ^
end;
4 D4 i) k5 i" U) |, w else% Z3 g; ?( d: ~4 u2 F) [
@.Destination := assignLObj[1,row];) c8 S7 {" X& C7 k: P/ I7 J6 U
end;
7 d+ A( J0 o: a) x6 U2 r0 B newDirection(@);
+ w$ u" a/ K' |6 G, N0 V) I, _ @.HasOrder := true;6 n" F7 ^5 C3 {1 h3 [+ e6 E! g, U8 J
end;. Z/ G5 ?) q# {9 }9 X- }. l
end;
7 R8 U$ g4 ?; v! c* J. hend; -- of the method
+ m- G% u& }' z2 R1 D( H |