/* called by: entrance ctrl of the object 'track'8 {/ J; D" t0 K% {
*/# B2 G- R3 H- b6 U+ c% S: y
is. V0 a, x. n6 E( H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% Z+ s: ]7 K3 c3 j
do8 d* `# d U% l1 c4 n
Lan := rootfolder.Internal.Tools.AOLlanguage;4 D2 e; T* W% c. F8 t. T( q9 P* [
if current = @.Destination -- else return( y+ J% h! s5 }( T* m7 S
then. ?; y, Y% ` p, U
@.Destination := void;7 T9 A/ Z$ p" B* E/ g. i! p: e% L& f
if @.occupied then2 n p1 Q" `6 a1 k' w; ]% k
part := @.cont;
: {# U& N( b) }/ z+ |) B @.transpOrder := void;
6 t* G0 f5 @$ e9 w# O" @0 D1 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
B# }$ y9 h' w" l$ L @,root.eventcontroller.simTime);
* `& i) W/ A4 ] @.HasOrder := false;
$ _2 I! R" i C. u6 o8 m @.DrivingHome := true;
H7 F6 f/ u* X1 `5 Q- } P rgManager.tryToStartTransOrder;
5 C$ D% c7 G4 @* r! { if @.Destination = void& ?- D4 o6 \' D V
then -- no transport order for vehicle @
2 Y( P( V/ z3 l- u9 [. _ @.Destination :=; l. b( }# [3 o& D
rgManager.nearestFreeStation(@,track.~);! P! m, {5 j. ]4 A3 B+ w$ f5 Y
newDirection(@); + |$ u+ }5 I1 S# j1 w
if @.Destination /= void then. _" I& o5 T x$ ]* b) k
@.Destination.NumReservation :=. I" d0 A3 ~% B
@.Destination.NumReservation + 1;" ^ P0 \$ w* Q- D6 y
end;
7 y" F6 ~, l5 S0 ] @.CurrIcon := "drivingHome";
9 {8 B# s6 j5 [) M# t; ^2 `( N @.DrivingHome := true;. x+ c& p2 d% n* Y5 K! \
end;
, i0 n6 U( `. u* k% m! S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& j$ M7 ]* V* w+ O" S" y# B part := @.transpOrder;
9 N/ ^/ W, B2 _8 D1 \& J9 A+ B; H part.move(@);-- load part0 M! Z% I- z2 j' r! d& n
@.CurrIcon := "load";5 J7 z4 ]0 @0 Y7 h0 F
GlobalDistObj := part.globDestination;
3 G4 r: e8 t$ W; J) G" F assignLObj := rgmanager.rgAssignL;6 k( a6 C' i- M/ `4 R' W" u
row := assignLObj.getRowNo(GlobalDistObj);; l9 ]: N+ q8 F5 \" _' m
if Row = -1 then -- since 70& J7 y4 {- a$ c# W+ t7 o* Y* _! o
if lan=1 then _1 L0 U9 U/ Q& y2 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ]. d. M/ j, f4 ^3 |7 y$ B to_str("in der Andockstation: \"",?.~.name,"\""));
2 t% h& c) }0 @3 A else
) f, N4 t/ \+ i h. i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! W+ y& B: u) R# N/ v8 C
to_str("in docking station: \"",?.~.name,"\"")); ( O; H. e4 K, d
end;
; c! i: o5 P; b* E* N+ F3 `( p else
8 T3 K/ {/ [/ L$ r* l1 c' X0 c( q @.Destination := assignLObj[1,row];* _1 E3 Z0 @# y! E
end;
: Q: G2 H3 l5 R% w newDirection(@);
( M1 G- f2 ?& @" H6 \2 k @.HasOrder := true;
1 \) J+ J/ r k% T end;
9 x$ l2 D6 m+ t end;
# P2 [( J' A& g* N0 t: ^2 ~end; -- of the method: F5 [9 i, k0 ?1 T7 d+ W
|