/* called by: entrance ctrl of the object 'track'
g0 _! ]; B7 N1 B*/
+ M: Z4 k0 y f- Y" n7 q3 iis
: h) E K. E- p: {" G part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ L2 @' L$ A+ p2 p6 a% Q3 z- o8 {+ H
do# Y3 k! I8 s' U+ ~) ~$ Q' H/ H# x
Lan := rootfolder.Internal.Tools.AOLlanguage;
' f- v7 Y1 z3 w L+ p* Q2 Y1 E) F if current = @.Destination -- else return
7 ^7 j+ O7 l, x; o2 T then
8 `' g8 M8 X; V& ] @.Destination := void;
; |! |8 b$ y2 u3 T7 w+ N if @.occupied then
# a+ V) `+ U7 J: P part := @.cont;9 H% D4 g; S1 Y2 w9 R
@.transpOrder := void;! Q( K$ [! C! c# K ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 e' u3 }6 N2 g Q, K0 A- v @,root.eventcontroller.simTime);
, D0 @7 @3 ~- A' l' [% v @.HasOrder := false;) g5 w8 Q# p, g0 f
@.DrivingHome := true;
3 W( a/ |- m1 a4 I! @ rgManager.tryToStartTransOrder;
9 J3 K' s5 ~$ M( N if @.Destination = void
' b7 q0 Y7 b- B then -- no transport order for vehicle @* K8 V- I! ^' L% O
@.Destination :=; O2 O% H3 k8 J
rgManager.nearestFreeStation(@,track.~);: r) Y) ]3 _% R9 P& o
newDirection(@); * n4 j, b1 ^* h E
if @.Destination /= void then! f) g3 U& ~1 Q; T
@.Destination.NumReservation :=
& i) Z8 |8 Q7 R& W$ t' }; a' g8 s @.Destination.NumReservation + 1;# j5 v3 P1 z* T& M5 {
end;
" u: j1 l" [# @$ g0 {$ }# h4 k6 ~% ^ @.CurrIcon := "drivingHome";% h3 u* U; ]" T( G2 B9 s; u! [7 [
@.DrivingHome := true;' a& z$ L0 {! v- f6 @& j6 T
end;
* g) m; M; H' f7 j: }5 B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 O [! L1 m! e& \! z part := @.transpOrder;7 H! K9 J4 r6 e- s% E
part.move(@);-- load part
0 M. H# f& _! `% L, U& G' V @.CurrIcon := "load";
8 G9 L0 {: Q$ o; y3 r+ }' Y GlobalDistObj := part.globDestination;$ H1 Y6 t' P1 d2 d+ t' I9 n- g
assignLObj := rgmanager.rgAssignL;
" A, I9 d: Z' y! ?; I" M row := assignLObj.getRowNo(GlobalDistObj);! N, M. |* i# h% \& ?; \% g
if Row = -1 then -- since 70
' T+ D# y5 Z2 P% { X, @ if lan=1 then& c3 d* W* v `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! w" W% H: Z( s2 m7 j& f to_str("in der Andockstation: \"",?.~.name,"\""));" y* p( [; u. Z/ ^- Q
else8 ?4 n+ d- y* q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Y p6 y0 k2 m0 U2 k. J7 t
to_str("in docking station: \"",?.~.name,"\""));
% N7 \2 N7 k' c- t$ P: B end;
1 z5 c' J- |( e) R else
' Q1 g; O+ t! W* X @.Destination := assignLObj[1,row];
) ^% I3 G5 P9 C0 \1 w7 Q6 z end;
, o( P' {& Q9 m8 h newDirection(@);
: J, K- f- \! o1 O @.HasOrder := true;, r, N# @: w& c- x2 Q: x
end;
" s: Z2 v, J+ p3 T0 K$ l1 k end;+ {* W4 u6 u$ O* i9 {
end; -- of the method
8 d" ~* |4 v2 M& F( k0 p% ?7 ~/ @2 U |