/* called by: entrance ctrl of the object 'track'
& d3 T' |& m! `( L0 l0 k; g8 Q*/
7 Z# u: Y. F' Ais
- u% Q" d" v$ E; b D. o part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 B: J6 K3 v) Y
do3 P, m" g) R2 v( C% H/ ]" L
Lan := rootfolder.Internal.Tools.AOLlanguage;
O; b7 R/ ^6 ] if current = @.Destination -- else return
4 ^/ m- d$ W- f) `' { then4 j: T W( W4 n
@.Destination := void;
5 L. q8 m' x, u3 Q if @.occupied then
, t7 `& o( t4 I% C$ h/ d+ d part := @.cont;# n" e( i7 P1 o4 r$ P
@.transpOrder := void;4 j. g' o6 g1 \7 Q4 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! ]# N* Z2 K8 e0 I A
@,root.eventcontroller.simTime);
9 ^; R$ Q3 N% t, E6 s, x @.HasOrder := false;: r2 l ~! V$ T8 s" P
@.DrivingHome := true;
! a7 A. s9 q9 v5 d! q$ \ T rgManager.tryToStartTransOrder;' J4 i1 y5 A. X, Q
if @.Destination = void" F# R1 G' y# P! l7 @! j) X* ]) b" n
then -- no transport order for vehicle @3 _3 ~3 E0 U' b- r& b
@.Destination :=
$ H8 z) X: t8 Z$ @7 q" \( L rgManager.nearestFreeStation(@,track.~);2 W1 R- d' Z. Y
newDirection(@); : ]4 m& [. s( u
if @.Destination /= void then
% x5 |! g7 G/ L& X @.Destination.NumReservation :=8 e" h# p6 ^6 e u3 H
@.Destination.NumReservation + 1; k7 `; | c' \* p! H" g- T# i
end;
9 ~ u- O2 J, p& j& w @.CurrIcon := "drivingHome";
0 h" r1 h& t @% U @.DrivingHome := true;- l5 c- o* e8 Y
end;& p r8 s2 h0 L& K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 e& r% Q5 i. ]& c7 P
part := @.transpOrder;: ^/ n& Y! ~% N! `) \6 a. W
part.move(@);-- load part
9 ~: T% z, P3 U$ _' l1 r e @.CurrIcon := "load";
( b+ m& U' c0 C! C) ^9 R+ g GlobalDistObj := part.globDestination;
9 n3 N) u# h( o l assignLObj := rgmanager.rgAssignL;
& Z5 }" p; o Y- z, D6 F" M# r, c, e row := assignLObj.getRowNo(GlobalDistObj);4 z& M7 j1 c5 R
if Row = -1 then -- since 70- i* H A6 l1 ^2 }+ m4 m
if lan=1 then
0 ]$ q2 k. w- s- C- @, a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: ^; e8 h$ G3 d9 U
to_str("in der Andockstation: \"",?.~.name,"\""));" a0 V$ O2 v& b$ O! {
else
2 B' b# b" F8 J+ V2 ]( L" S) Q7 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ D. F/ X9 b% Z. W4 `
to_str("in docking station: \"",?.~.name,"\"")); # s* N5 w7 ~$ G/ A( [ t
end;
/ {7 e7 e1 x$ x. D+ P/ Q! M else
1 L5 H( n8 B4 Y$ q) p* E4 @ U- j @.Destination := assignLObj[1,row];8 W! L2 I0 c2 k- }5 v6 C
end; 0 |% }1 ?! Q, e `/ S
newDirection(@);
, p, Z: h! _- Q9 j2 [' z @.HasOrder := true;; {: v. t- d8 [9 T
end;
$ K; r. K5 W# A. q4 Y g6 v0 @ end;. `7 N: O0 J( Z' o* G7 I) L
end; -- of the method* z+ C: b: N& u; @( O0 f3 d1 l% t0 K
|