/* called by: entrance ctrl of the object 'track'
, I" ~- G, L# e* k' A+ j% m0 k: e*/
( a4 X: O8 _1 X F; f( c: J, n# ris% ]+ p; N) f9 C" Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ~! _' H2 o1 N( ~6 f: H& @3 J
do
5 g8 ]% p t8 R0 G! o' p9 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
; v& e; c+ t/ B if current = @.Destination -- else return. L1 T0 I; \7 Q" y( \& b3 C
then$ W4 w" D3 y" K+ C/ D6 B
@.Destination := void;" k% H. v4 L4 x7 k$ L3 X2 J4 t
if @.occupied then* {, Z' |& U8 s; [
part := @.cont;
& L& \- D: x' }! j! F% z @.transpOrder := void;
. N% E0 r* y: K) R3 R6 _7 F: O5 P4 U9 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 @: k% l* D8 V/ }
@,root.eventcontroller.simTime);7 s+ }1 H3 {8 S
@.HasOrder := false;
3 I' @: f+ L8 |0 `, J4 D6 d' R @.DrivingHome := true;
4 |. h. J9 I& W6 p+ d rgManager.tryToStartTransOrder;
& G; x& v# I) @; o* y, g3 L if @.Destination = void
2 l0 T* x$ M+ ~9 c4 p! F2 U then -- no transport order for vehicle @8 E& Y" j4 q* I6 f" S b- j
@.Destination :=% ~; j6 A1 I, b3 F
rgManager.nearestFreeStation(@,track.~);
$ V6 y9 b' D! S; e0 ?, S: {7 H! o5 G newDirection(@);
$ e$ `7 j3 v4 ?. o9 _ if @.Destination /= void then4 C: e8 y! I% K9 C' N
@.Destination.NumReservation :=
" v$ { i0 C7 t3 Z" C @.Destination.NumReservation + 1;* p# H8 H6 u) f% }7 {1 \. B
end;
0 S4 P# P! F' n _ @.CurrIcon := "drivingHome";( E& a+ f q; Z% w. E4 `
@.DrivingHome := true;
8 o8 f) C/ N, J6 R( b; x, d5 `( g end;
) H( ~( K9 Z {1 E! N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 x! {( ~# _* h$ R1 c part := @.transpOrder;
! d6 |8 H9 K& G: z+ v part.move(@);-- load part% t2 p3 i7 }& `+ b* {
@.CurrIcon := "load";
$ \ I$ `8 {& O; Z) B5 H- s GlobalDistObj := part.globDestination;
# c r) W1 r: L* C assignLObj := rgmanager.rgAssignL;
1 }+ X0 N( C3 _ row := assignLObj.getRowNo(GlobalDistObj);
0 \& W# U$ X7 l& Y if Row = -1 then -- since 704 u A; ^* D w! c) t" E' h
if lan=1 then
9 x \* w' \/ w( J. t( Z2 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 u6 m6 _; a/ U1 a to_str("in der Andockstation: \"",?.~.name,"\""));
; {/ V4 S8 k+ p9 D1 ^$ |% _, q else
, a+ B& U h, H1 |2 N! L7 Q2 M9 w6 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: N/ @4 [. K* R6 {
to_str("in docking station: \"",?.~.name,"\""));
0 ]/ L/ j$ L L% _9 B. O2 e- Z2 T0 W7 i \ end;
; Z* c7 z' i+ E% M, j/ N; X else" Q5 I' j# O# X+ @; _* i5 r: k
@.Destination := assignLObj[1,row];
3 e! L* K7 K$ B* K3 ?* \, T8 L end;
4 ]9 I1 [% n8 ?' Y& j- p6 a) d newDirection(@);8 E7 m. t4 L: R' w
@.HasOrder := true;8 H( C: ]. m1 t. Q# K3 D
end;- C0 ]/ |1 \( V. l8 k* u
end;
. g$ r0 l2 S+ S4 E: I Z: [/ ]end; -- of the method
4 B( I! U' N! k1 ~- O2 W; s |