/* called by: entrance ctrl of the object 'track'5 d8 d1 U+ e6 J% T
*/3 h/ R& Z: L6 f/ g. N
is7 R% n- h# S2 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( Z& ?# D* G; N, l, Y
do
( L1 ~- [, u) E Lan := rootfolder.Internal.Tools.AOLlanguage;6 G# M; v8 g5 z
if current = @.Destination -- else return8 d" k F, H# x) }8 S5 Q
then% c0 L0 V3 h, ^* [ [+ O
@.Destination := void;
# X5 }8 J0 G# Y' d4 S if @.occupied then
4 q1 ]( x7 s: r part := @.cont;8 u9 M5 `0 T. c' Y4 s* ^
@.transpOrder := void;# w) n+ }, E# s- G5 b7 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 U' N1 F8 }* @% } @,root.eventcontroller.simTime);7 ], d1 n$ J3 v* ^1 E
@.HasOrder := false;
1 P; O; v' M8 [# H! }! H/ O6 {+ { @.DrivingHome := true;& Q: g& L* {6 \; R6 s7 C4 x2 p/ o. f
rgManager.tryToStartTransOrder;
. }+ n% l% m% Y% V; T if @.Destination = void
7 J3 [: j4 q. d! S r9 m/ J* M then -- no transport order for vehicle @
- O3 _) j+ A4 P$ T @.Destination :=- G# W; y7 d. C
rgManager.nearestFreeStation(@,track.~);# O: p. Q- \' G8 R! w
newDirection(@);
* u$ j7 q2 F9 ]) g4 Y, P if @.Destination /= void then
?. h7 ?! K6 q$ n @.Destination.NumReservation :=
8 `& _2 ^5 ^7 r! I6 d( Z _& e8 r @.Destination.NumReservation + 1;7 Q/ B2 {; Z8 U3 z6 @( p7 i
end;
% Y( O9 V! i) p8 R0 q' K @.CurrIcon := "drivingHome";: k: n- p, {' u. p, S8 j
@.DrivingHome := true; ^- e; A0 N4 t2 [% \0 ]
end;2 W6 X9 x1 g( d: D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 W) i# ~; U, u% z part := @.transpOrder;# P* m$ K, N! b. S
part.move(@);-- load part$ ?# I3 z- i6 I) H* @
@.CurrIcon := "load";
) b+ P! z3 h" _9 P GlobalDistObj := part.globDestination;. h5 j `( a: A* I \
assignLObj := rgmanager.rgAssignL;
9 g1 }* o: L: L2 l5 j# ^$ F row := assignLObj.getRowNo(GlobalDistObj);8 h6 l' e Z# }
if Row = -1 then -- since 70% {& e/ l, W2 }* g9 K$ v2 z
if lan=1 then; V. |2 y5 t% b$ s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* r9 K, a" Q9 W9 P
to_str("in der Andockstation: \"",?.~.name,"\""));
5 U4 \3 d: a2 N2 {) W7 u else
; w; S) x5 U6 E! e$ i8 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 n+ Q/ X1 V: d9 M, w2 w7 u9 k2 |! j" r
to_str("in docking station: \"",?.~.name,"\"")); . W( \4 u% o. a3 ^& i @* q; w
end;" q7 t; s, e* s6 b% r. i
else
: i- R9 z! F9 p4 r$ } I @.Destination := assignLObj[1,row];5 C* G9 m+ r% R! }
end;
$ c" R- }1 k9 O6 r$ H6 m# _" Y newDirection(@);
0 D; {& a* p3 }% Y5 R6 t" R @.HasOrder := true;/ z& {; D% a4 ?1 R; p
end;
3 X- b3 W, ]8 O9 A$ ~0 h7 a2 g end;
# }6 v0 t9 G3 _end; -- of the method1 L$ q; \4 F# u5 l- m+ e0 v
|