/* called by: entrance ctrl of the object 'track' T6 Z/ \# }& L1 d
*/3 @8 x: x3 R8 E8 e- A
is
( S, R% x6 s3 B& Q9 M4 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ y7 K) f8 }* Edo7 t2 \+ m& f0 h2 [6 A
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 A) S' C, A) B8 s: I* }: T if current = @.Destination -- else return
) n( J* a2 g% M; W then
! Q0 p. [4 l( x3 y @.Destination := void;% Y& t6 ]! k' h2 c+ ~ g5 z: t
if @.occupied then" w, x! C2 ?; \5 p* P$ e( ]) w
part := @.cont;
4 _( p# \- a; D& Q! N6 l! j3 z5 ~$ Q. M @.transpOrder := void;& q$ O) @9 u% s1 f" p, l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 n* B* k* D& {! G( N, b w6 k" m1 d @,root.eventcontroller.simTime);. o4 W8 [/ V8 ?/ U" y1 [# a
@.HasOrder := false;/ G7 C9 L" S( ~$ }$ v: G* B2 q4 y8 D
@.DrivingHome := true;) K& X8 I3 S T* V+ T X. g
rgManager.tryToStartTransOrder;
# s/ N5 J5 G1 l" |# K( z2 a2 i1 J if @.Destination = void5 a$ X' e- h, C G. x
then -- no transport order for vehicle @, A% {2 K7 V9 Y( J6 m# @8 o2 W7 x, u
@.Destination :=
; I) k5 G' r% F5 i rgManager.nearestFreeStation(@,track.~);
, K' q- ?: |" D: p4 A' t newDirection(@); , j: e8 S m5 S. X
if @.Destination /= void then
L$ q0 P' M( j @.Destination.NumReservation :=! Z2 B3 r6 ~4 I0 o t; L
@.Destination.NumReservation + 1;1 @; \" g) J1 S
end;4 a" B- w3 R5 S% k% ] X" j" H
@.CurrIcon := "drivingHome";
; c8 X' E" C/ Q. c2 { B @.DrivingHome := true;# E3 l, k* R- B8 K4 V' v6 y
end;+ J8 f, T/ |5 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& y0 ^, \; j, M V; n part := @.transpOrder;2 v: f, _4 J& m, S: w4 `' S
part.move(@);-- load part4 P/ j2 i1 \" L. T
@.CurrIcon := "load";
2 ]% {! S! K; E& c' Z GlobalDistObj := part.globDestination;- `. m0 U V/ G; \
assignLObj := rgmanager.rgAssignL;7 @8 P: p, {8 {! ?8 y/ Y
row := assignLObj.getRowNo(GlobalDistObj);/ [6 a0 b- ^. O5 _9 D. [+ x! H% z
if Row = -1 then -- since 70
+ S# b, Q5 A, {+ | if lan=1 then4 k! V% s: x, K/ T3 p( F3 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* V& i7 c2 {+ w
to_str("in der Andockstation: \"",?.~.name,"\""));
, f3 X, e+ M* d' m1 ~4 E, l else
" Z4 ` x, R! ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* G$ P% T- T$ z8 T
to_str("in docking station: \"",?.~.name,"\"")); ) r) t; x* Q" c: z3 [* Y3 ]" Z* E
end;
' P: _- p: I% P/ n7 F5 j0 { else0 K, M# U% ?9 W' P; l# K7 k; p+ }2 j: w
@.Destination := assignLObj[1,row];
' X0 s: N" n8 ]6 F6 z: w. Z end;
; k/ R) Y! Y# f) _1 B newDirection(@);# G9 z, f! m/ O7 P9 x% k" n
@.HasOrder := true; C! \% ]4 P' H7 N/ b& F2 l! @+ D
end;
" u& D; c% U/ w9 V end;
0 y$ X/ D# f! y3 E/ }1 R: U% Oend; -- of the method5 c9 l* `( n$ z6 z8 ?' ^
|