/* called by: entrance ctrl of the object 'track'
5 O: ~9 _1 N, d5 u& a*/
5 R+ h4 Y% w" u5 L8 n+ i0 f, ]' F1 dis, B2 g& ]- k: ]7 i! s0 C2 c" ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 E5 @& N1 Y8 k8 bdo
0 c0 d# G! S4 E, ]$ A% N, q Lan := rootfolder.Internal.Tools.AOLlanguage;/ w7 r/ n4 ~ M0 P' `
if current = @.Destination -- else return: N5 g7 q; |4 d. G j
then
2 k5 q$ D) `; J/ N; b! n( l- k @.Destination := void;
( G* `7 ^7 N! j6 A( v; x if @.occupied then
6 {4 v) i. u7 x2 Y; Y0 m; T1 l! L part := @.cont;
! s( v8 r4 E2 Z8 @9 {& u( O% e1 p @.transpOrder := void; q5 C% J" d0 @' z* B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- P0 q% k( b7 |. E9 X
@,root.eventcontroller.simTime);8 l% K# B5 ?" k; R
@.HasOrder := false;: x) K& y& g# M: ?
@.DrivingHome := true;
2 J6 A) _5 ~( o" P rgManager.tryToStartTransOrder;$ J& }4 | d: b+ r( j* v% e- f
if @.Destination = void
% e0 v8 R; V3 B/ _2 n+ m! L then -- no transport order for vehicle @+ V Q2 u7 j9 ]; A3 u
@.Destination :=
0 ]( L0 v, U$ X' {9 C rgManager.nearestFreeStation(@,track.~);: ^& N5 D( U; q4 b8 q) x R
newDirection(@);
; j4 V# V! x& M' d) f if @.Destination /= void then* m |, U! W+ _/ Q. Z
@.Destination.NumReservation :=
$ `! D+ _+ x: ~; ]3 @ n$ T! h3 y# Z @.Destination.NumReservation + 1;0 [ q7 J3 W: Q4 y H! h# ~
end;5 _4 z/ F7 [9 L9 N3 Q$ V7 m
@.CurrIcon := "drivingHome";' f% m0 i3 b" m6 {7 H3 x' d( I, W
@.DrivingHome := true;( i# M: c+ }# A2 o$ k
end;* b) u `4 H0 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. {4 c, X. ]# f% x( i: i3 }
part := @.transpOrder;
3 ?8 D" I9 ?1 a( \% L2 @ y part.move(@);-- load part
; k: z8 U% C8 l; a @.CurrIcon := "load";
$ P2 s9 S# y2 i GlobalDistObj := part.globDestination;, U2 d8 l, L0 S, _ \7 P
assignLObj := rgmanager.rgAssignL;. Q4 N" \% e8 |- \
row := assignLObj.getRowNo(GlobalDistObj);' Y1 R- {1 r$ L0 O0 H3 A8 W
if Row = -1 then -- since 70
1 D3 Y- z9 T, h% a2 e! h" I) ? if lan=1 then* d7 }0 j: y; b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 a3 I4 ? ?1 O1 y9 d4 H
to_str("in der Andockstation: \"",?.~.name,"\""));$ s4 a% g$ m! j# k$ h
else# ~# z, w) i" |; Y% C) ], _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: {, D1 y. n! F- _4 f to_str("in docking station: \"",?.~.name,"\""));
3 B/ B) t/ o' a$ x8 _ end;2 I4 N& i4 }7 f9 e9 w
else* Y; k6 h) G( {* N1 B; K( H% c
@.Destination := assignLObj[1,row];
, i) e( e' ^5 B' P! G9 T$ @ end;
3 v4 |* S8 w8 F% W8 J% F0 I) P newDirection(@);
* X* h# E( p* e P @.HasOrder := true;
2 K' j2 V9 j. A* _- j- O* L* F end;
/ l! V2 j# M6 S end;- Y9 }& p6 _1 t4 r8 n' T
end; -- of the method; K% x! c. g6 U! d! j. n
|