/* called by: entrance ctrl of the object 'track'
. i; J4 O7 x; |2 o# g*/( M8 E7 A5 t9 k" \/ A% V
is
. I* s7 L' C3 ]7 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Z( s: r. f0 q" N
do
- R/ d$ p/ V$ z/ a @4 X3 _ Lan := rootfolder.Internal.Tools.AOLlanguage;9 r5 [* E5 b" x/ Y# I! u3 x" M
if current = @.Destination -- else return* m6 j/ z. P4 P9 c. A
then
; p8 J7 S: @7 P, k @.Destination := void;
: d2 E$ Z q y7 y if @.occupied then3 P& k, z4 `+ t. _; A8 g
part := @.cont;( \ h! g1 z( k! f3 w3 @- p. P) I
@.transpOrder := void;4 X. F) M& b; h! x4 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ N% b" I' F* r, I) K* m6 V2 }' Z
@,root.eventcontroller.simTime);3 U- R+ U, u* ?0 k/ k; H0 t" X" N
@.HasOrder := false;& P% x, j0 G) ^( M
@.DrivingHome := true;
- o5 p) k% }2 h/ \( E; [5 k- l rgManager.tryToStartTransOrder;
0 O$ s6 ^2 X2 W4 R& Q if @.Destination = void
$ p5 e& {' W! g. n- r6 W then -- no transport order for vehicle @. i9 ]7 X/ c/ d8 ]: b: c% W/ r
@.Destination :=
4 Q) j, L; {! I rgManager.nearestFreeStation(@,track.~);* j# }5 B* r ^6 K2 s; c
newDirection(@);
, @" {5 B, V x* Z" w' J if @.Destination /= void then
J! ?7 Z, O! L8 }) Q6 a$ L$ C1 Q @.Destination.NumReservation :=' p1 Q( z0 N7 q$ U, _5 |+ R
@.Destination.NumReservation + 1;
5 W* g! y8 _+ e; x* F end;
" t! X U1 R2 R' M! r; @7 X- K @.CurrIcon := "drivingHome";. r4 T% g: j4 L9 S3 d
@.DrivingHome := true;4 G/ D; |% J5 q
end;* Z3 }6 j5 g0 B9 D, B% D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, G& G. T: s! I r' x1 P
part := @.transpOrder;: [* \4 C2 x: G9 \( N
part.move(@);-- load part
5 R, v( I% d8 C @.CurrIcon := "load";
' W+ }( |/ G" E, } GlobalDistObj := part.globDestination;
. f: O4 ~$ L' g/ x6 ?7 h2 @- O+ ~- N assignLObj := rgmanager.rgAssignL;6 g l2 Q3 i4 {4 t
row := assignLObj.getRowNo(GlobalDistObj);
, N* L, P2 A* d if Row = -1 then -- since 70( Y; y b+ x3 s4 q! e' R" `
if lan=1 then
5 Y) w( Y$ `2 z. }8 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 E+ q* n0 b: \0 e/ z1 c to_str("in der Andockstation: \"",?.~.name,"\""));
9 Y' C2 k; m9 \9 F& E5 F else4 Y a- ~ J4 C8 S3 T% l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! C2 \0 n1 d8 M- Q$ A d
to_str("in docking station: \"",?.~.name,"\""));
" V) S% C: g1 f( L1 Q6 \, } end;, N. M$ o2 ]2 }
else9 s( [$ C4 B* | t9 W2 O
@.Destination := assignLObj[1,row];& y4 ^( B7 z, W) N4 m
end;
' |( m$ [( c4 J# O. q newDirection(@);+ G7 y9 R3 c' B7 V* x: `
@.HasOrder := true;
+ J" ^9 Z) B7 ~: D3 I+ a end;) k% d: @- m$ |" m& T
end;7 ]5 W2 y8 A* |$ k
end; -- of the method' m+ Z) K6 \5 v/ q" i
|