/* called by: entrance ctrl of the object 'track'" ~2 C8 J3 @8 o w" d( D
*/8 y% H& I0 O+ v" n9 O0 q' v
is
% M: t# ?- x- ?) f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# a7 w3 H- i5 Bdo" t3 l2 i% l3 Q) h0 i. E
Lan := rootfolder.Internal.Tools.AOLlanguage;
% M6 }9 A' G6 c& L; M if current = @.Destination -- else return9 r' ]1 _5 U5 O( A
then" M6 o7 K$ F0 H% B( \" |
@.Destination := void;1 L: `% ?# H4 _# r# P+ n! C
if @.occupied then
9 y% C8 h' p4 U$ h3 X& Y part := @.cont;/ U/ O( Q% K* H* ~0 ?0 r
@.transpOrder := void;
1 t. z- C w6 z# o* L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! `8 k2 j( @5 ^ d
@,root.eventcontroller.simTime);3 e* a0 K; ~1 @5 x. w1 F' e
@.HasOrder := false;* N [- U8 M' y9 }8 g) p
@.DrivingHome := true;. _1 i* V" d1 `4 c. W
rgManager.tryToStartTransOrder;4 u6 w- n4 m: z) Y
if @.Destination = void) A. ~' c; U1 \3 D; J6 `& V( B3 M
then -- no transport order for vehicle @
" T3 h8 z+ N, n @.Destination :=
# q! n2 Q- ]$ J$ F rgManager.nearestFreeStation(@,track.~);
- l6 K1 d9 E8 Q3 e8 X. c newDirection(@); * J8 W( o; o0 j {# f, [/ I
if @.Destination /= void then
# d2 U1 p8 j; P @.Destination.NumReservation :=( Z- N# [/ j9 [$ v
@.Destination.NumReservation + 1;& q# d( v* J1 ^9 E
end;
: ~5 G! @' }4 Y( d @.CurrIcon := "drivingHome";3 X5 N: r2 u0 I# @' K/ |
@.DrivingHome := true;* r6 |. O' Z$ M% y7 L3 C- N: z
end;
' @4 i8 \# z, k: {2 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station- b, V4 J4 c0 d R0 A' b9 C: m
part := @.transpOrder;# c/ ]4 m6 c/ S6 F& j w
part.move(@);-- load part( L0 G7 g( N7 ~* F! a! ~
@.CurrIcon := "load";9 y) a( g3 I* `
GlobalDistObj := part.globDestination;* m# c6 Y6 e4 Q1 g1 `4 o
assignLObj := rgmanager.rgAssignL;
) V& C8 Q5 M: t row := assignLObj.getRowNo(GlobalDistObj);7 H6 s! S. z, A6 |
if Row = -1 then -- since 700 ^7 O# k7 y( f3 t1 D0 z4 x' U
if lan=1 then8 v9 K: m: [6 A! n: U: {6 q [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 i0 J& \& U/ a to_str("in der Andockstation: \"",?.~.name,"\""));
/ J' o6 j; X& q k! b( X ~2 s else& m: f, z0 ?: H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- z- a2 M1 R) C4 `* T to_str("in docking station: \"",?.~.name,"\""));
' N7 y5 p$ g5 i; X6 ]6 F end;( Z* K$ W/ q& S; R) ]8 d2 r E
else' n2 t% i1 e! ~! O9 V, s3 H! o
@.Destination := assignLObj[1,row];! ^0 r6 j; `; R, `) ]1 h- Q9 b
end; 7 u+ y6 u% t U9 T+ v
newDirection(@);
' Y p7 p% G5 p7 @* e# q @.HasOrder := true;% O6 ~ ~9 W# S7 ]+ G5 r
end;
7 h7 g; z% Q0 b$ U* e1 b8 t end;, u! _2 Z8 }- B$ H0 f' @, ^; ~
end; -- of the method) R6 b5 }4 i; k! l& J
|