/* called by: entrance ctrl of the object 'track'
( R0 M' ]% z* q- I3 y*/
2 O; P% O+ z6 K0 J7 lis
' ?& w) ]. @- x( J: B, x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- ?; H! p% w# V9 w$ gdo4 n$ I7 U+ P+ z, G% r. L1 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
" g* E0 R; B, c if current = @.Destination -- else return
) C. X& G! Q+ z! }, V/ B then! t$ d2 b4 A7 e" O8 s& a
@.Destination := void;
1 i; H$ N+ \# m2 R if @.occupied then) K- X* R* |! ]+ _# X
part := @.cont;
/ K# R. B W1 Y" r @.transpOrder := void;
# E6 a: B0 ^( D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 E+ F% H: g9 a5 z! t
@,root.eventcontroller.simTime);
. F+ Q$ q- q" z7 \3 I9 ^8 J @.HasOrder := false;
# a2 P/ C+ P4 ^$ q+ p @.DrivingHome := true;
S) v/ p6 i' E7 q! U# ` rgManager.tryToStartTransOrder;
& f% E7 b# t$ V/ J/ ] if @.Destination = void9 r0 d/ d6 v Q) q& i [% U
then -- no transport order for vehicle @
# s" x, f9 T R @.Destination :=$ t4 d+ N& Q/ G
rgManager.nearestFreeStation(@,track.~);
' @3 [5 S. E T# s newDirection(@);
% v: s' w) v: B6 W! k" z8 A2 t if @.Destination /= void then7 c& U6 T, I8 J7 t& ]; o) l$ n
@.Destination.NumReservation :=; s# [/ O/ d, y2 |. U
@.Destination.NumReservation + 1;
/ Z9 i8 y- G7 u2 j end;! e9 E6 @2 S' f- ]4 ~
@.CurrIcon := "drivingHome";
$ Q9 i2 p) m1 m$ l. W# G @.DrivingHome := true;
$ z$ a8 O Y& z# f5 [ end;* B% y8 \9 P( U/ P+ {" o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" a2 e: [2 ?$ F5 j( f5 S
part := @.transpOrder;+ X5 {* T1 [4 `, r6 |3 s0 G- X
part.move(@);-- load part
5 Z A7 T5 T+ d& ?! X% Z @.CurrIcon := "load";
# }$ J2 L- D3 M. ? E* a GlobalDistObj := part.globDestination;0 B- D% O% }; f% ]
assignLObj := rgmanager.rgAssignL;1 V0 W# T* u! s3 n% r3 W
row := assignLObj.getRowNo(GlobalDistObj);
- s% s' [; F0 F- ~+ @7 O if Row = -1 then -- since 70) v0 Y; S, k4 I- r+ m) s+ d7 `
if lan=1 then
5 L: T4 G& @/ @% U- h$ r+ P$ Z/ b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ?: T8 X* m% t$ `" M to_str("in der Andockstation: \"",?.~.name,"\""));8 G% C3 d( [- Y; G2 P5 \: }& z+ P
else
, u; i0 x" X1 Y \! l- | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ]/ K0 [- \8 L3 T3 \% s
to_str("in docking station: \"",?.~.name,"\"")); + L0 z f; R4 \% U/ n: g Z
end;
v# p) S' N5 ^! S else
+ y0 R! i8 K# K U0 ?4 k( I. t% O2 Q @.Destination := assignLObj[1,row];
$ O+ q5 _2 u( H end; - y* o% U/ @( s. e# c" u J
newDirection(@);- `1 v2 l& G7 u* T7 h) [" ]8 Q
@.HasOrder := true;3 G; t& f7 A- H2 T a
end;
% k7 W6 Y) M8 n% J end;
X9 u+ s$ H. X! ]. @' U2 Mend; -- of the method
- W' Z6 P3 S* ^" g9 h0 Q) _ |