/* called by: entrance ctrl of the object 'track'
! V4 Q: V; ]$ Z2 h. E*/
I/ C# i. n# Mis
3 t6 P- O6 R, M7 [% U, N ]# l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 L, \0 r# L; a5 [5 w! Odo
7 _8 Q* T+ g" S Lan := rootfolder.Internal.Tools.AOLlanguage;
$ C5 x3 g0 w# A8 u# ^$ s# ~- t if current = @.Destination -- else return
5 Z2 Y$ a# G, w; G( }( ` then( b5 ^2 e+ O; o- l& c* k2 L
@.Destination := void;; `# U. o; }) b% j' F" c$ Z- _
if @.occupied then. {# ]3 e: U! H. C. s+ a+ ~1 f
part := @.cont;7 m* ^% B. A+ }4 ?# W
@.transpOrder := void;
0 G" D% w/ `/ x V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. F! n R. n8 i) t9 p S+ m( L @,root.eventcontroller.simTime);
1 p3 |4 D2 r/ J9 u! [! T: O @.HasOrder := false;5 @+ K" c; Q' ^/ @1 @
@.DrivingHome := true;& y# e2 G4 U! \; O' L- O4 U
rgManager.tryToStartTransOrder;% y. K1 ?. u: h1 r. L1 M
if @.Destination = void
* G/ W4 u; r! C" @4 U" B' p then -- no transport order for vehicle @
% \ ?* \# d" I1 G# ], e0 p @.Destination :=3 [' T5 y4 |/ {3 J6 ?0 A
rgManager.nearestFreeStation(@,track.~);3 a7 V! X& o* j( u2 c
newDirection(@); 9 r* w2 ]" ?3 T: i0 D( G
if @.Destination /= void then, [; U r! E, T% r0 \# ]
@.Destination.NumReservation :=1 X) O. W1 M) m# T
@.Destination.NumReservation + 1;
3 @6 N4 o3 W# x/ _1 K end;
8 V+ F1 Y7 e$ z2 v$ l$ ?% l @.CurrIcon := "drivingHome";
% T5 u- k. I. H; v @.DrivingHome := true;
/ T* c$ ]" } j end;5 M1 }# M* g5 C/ t" W0 h; q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
f! ?. U# L0 N; g8 \ part := @.transpOrder;
}8 T# j3 ~" F# K% x3 ] part.move(@);-- load part
" Q: z: E7 Y5 a% W" }9 C @.CurrIcon := "load";: j! L% m! b+ J# o, k5 g+ y) @
GlobalDistObj := part.globDestination;4 G+ ^6 y0 O4 T' k' `/ W2 n1 F
assignLObj := rgmanager.rgAssignL;0 m; g$ a9 m7 u5 p/ L% \
row := assignLObj.getRowNo(GlobalDistObj);9 s9 Y, J4 f0 Z, N: Z
if Row = -1 then -- since 70" k9 b/ T, A4 s0 y+ u1 z
if lan=1 then1 J8 w: e( u2 h, S* i& W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
}! j8 ~9 c( m$ x to_str("in der Andockstation: \"",?.~.name,"\""));
; i: y6 g' Q- q else
: O' {$ V0 M: }1 ~2 F* C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?( p% [3 Z$ A, y- w, D/ u
to_str("in docking station: \"",?.~.name,"\"")); : r" ] k, M8 R3 @- }
end;6 k. _. u6 X! X* H
else, F/ O2 G s1 ?% C# u8 p9 M
@.Destination := assignLObj[1,row];
) U6 E2 |! S3 c/ A4 ]1 G8 x( r6 f* g end; & ]2 L4 F0 {% |! G: W" U8 E
newDirection(@); n* ] Q$ K% O& ?1 {4 C- J
@.HasOrder := true;
5 B% b, C6 u" \3 B) R8 a end;
0 @ {2 n, v! ?6 c% L9 U- o end;
) ]+ ]0 f; x* V2 x2 D& ]1 }end; -- of the method% |0 ]) g% P7 ~, x
|