/* called by: entrance ctrl of the object 'track'
7 r) P; J( ]) s5 s*/# f# ?8 Y8 A% c. S1 k8 q; y
is/ l& m A: F- k. R1 \# h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 p* g) W" @7 O6 qdo" L; y& V$ J+ d* f
Lan := rootfolder.Internal.Tools.AOLlanguage;& e# | E% z3 K5 x: D
if current = @.Destination -- else return
9 v5 W; i S# [7 K6 Y, m+ ]* H& d then5 W) k E& v9 b( Y* x% L
@.Destination := void;6 X n. i7 w2 l* N
if @.occupied then
# i3 D5 P, r3 O0 C# H- {9 Z9 I6 C part := @.cont;$ Y8 D' X! ^3 }6 f
@.transpOrder := void;% P7 P! }6 Z3 e h" o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 N$ T5 W! |* U @,root.eventcontroller.simTime);8 B4 S. ]; ?# Z/ q
@.HasOrder := false;
1 W5 S5 s- M. T- i- S @.DrivingHome := true;1 O5 h$ f% @; p% U; q& v
rgManager.tryToStartTransOrder;7 y3 b; @% u0 m* D
if @.Destination = void+ O6 S3 u. p" x
then -- no transport order for vehicle @9 }9 P% X N! [+ K1 ]$ V
@.Destination :=' N" A! y& P. J) r4 Z9 R& y# o
rgManager.nearestFreeStation(@,track.~);
e% _9 ]6 h- G0 } newDirection(@);
4 H+ d8 e8 \* |% n$ v if @.Destination /= void then3 Q) O9 ^' c9 W+ E3 V7 V
@.Destination.NumReservation :=1 ?) p8 B D4 _7 j" B: l& f* I
@.Destination.NumReservation + 1;1 `" m6 R) t; T# x: ?2 e) }
end;
: h- h( r% |& g+ k$ }: m/ q @.CurrIcon := "drivingHome";/ s1 Z3 ]' z F+ _ g
@.DrivingHome := true;3 R5 H! Y% v) ~0 N# } N3 l
end;/ k; R7 T' ?# h0 A; B% N9 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 D0 O. s; `, l7 b" m; f8 j. o part := @.transpOrder;& D0 I' ~5 N: b. q
part.move(@);-- load part
# N, G. `6 X1 Z% o) x8 W @.CurrIcon := "load";
: T, ]7 V; c/ e) c GlobalDistObj := part.globDestination;. f% y. u: b: o6 A6 H
assignLObj := rgmanager.rgAssignL;
& ?1 m6 L( X7 o1 @6 k! \, p! i' j row := assignLObj.getRowNo(GlobalDistObj);7 E9 ^/ o, j8 L
if Row = -1 then -- since 70
& K4 V# u( a6 u2 ^ if lan=1 then/ ?# m) \ }- i Q }3 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 O8 q# e+ }, ? to_str("in der Andockstation: \"",?.~.name,"\""));) Z' m8 V/ x$ I$ u/ _
else
$ p, r1 Z0 a/ { k) d. s% W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! |. ~. D* K! a8 G. q2 R& l
to_str("in docking station: \"",?.~.name,"\"")); : H7 ?8 ]7 R) I) }' _' X
end;
: _1 D" ?( F4 d& c( p) a else. G( N* f# f* G: I
@.Destination := assignLObj[1,row];: c) g) a5 W! `0 u3 z1 s; a! y0 k
end;
2 V' A( H- X1 l. ?3 P4 B newDirection(@);. c* T2 f$ M( y! O- T0 Z% D# P
@.HasOrder := true;
t: t- F2 f2 N1 R$ K end;
( w& d) [# F, ^) c; u7 p5 B% R- A+ O' W end;3 D9 [& G- D `) [' t; x W1 k
end; -- of the method
4 }% P( U0 q6 u% U, k3 i5 n5 F! g( D |