/* called by: entrance ctrl of the object 'track'
7 K x: _' z& `' v*// f; S& X& \. e4 |
is0 Y D5 D6 Z3 P& E' k- w' {/ b; p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. ]/ q6 p0 U' u. ~% i5 tdo: @7 `( C5 B6 K* j& ~- ~$ o
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 I- d, u7 O# P1 r if current = @.Destination -- else return
* y& z8 ~% z) o+ l" ? then
. w+ g) {+ Y( y; b0 ` @.Destination := void;
8 d* \+ z: T" N, f if @.occupied then
. T# P) U* s3 @$ W+ w9 G part := @.cont;1 l& b! }. \8 W! `& T
@.transpOrder := void;
9 X5 P) G4 z4 R5 R' T$ |# P" ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 Z* j0 s# e* H$ i% ^) u9 x
@,root.eventcontroller.simTime);
3 c5 i& J2 O( @2 B" Z) S* q @.HasOrder := false;
A4 w) |5 U6 ^1 V* Q- f2 q @.DrivingHome := true;2 A- r0 G% H4 Q- R1 a, W0 c( E; i
rgManager.tryToStartTransOrder; k( @ p/ T& T- ~/ E' F
if @.Destination = void5 x" t3 T" j7 G0 j* X8 U" D
then -- no transport order for vehicle @' `, x( T. B, I+ ]
@.Destination :=
6 I6 ^# [1 ?- b' V2 f1 | rgManager.nearestFreeStation(@,track.~);9 Y% B% r& l% j i& W3 y+ C
newDirection(@);
) ?: B5 @/ a& L4 H3 J! Q if @.Destination /= void then
+ c# }, f/ \" j( W& k @.Destination.NumReservation :=
, ` S; C( d) ?! B @.Destination.NumReservation + 1;
?) r- J. z; q, u4 s end;, H. Z- p& p" ~( }' Q
@.CurrIcon := "drivingHome"; x8 f# J" b: h
@.DrivingHome := true;
0 ]$ f2 E, { V7 r1 C end;
2 _3 H+ g0 d4 N. H; w- J L; L else -- the vehicle @ is empty, both vehicle and part are in the same dock station; U- C* Y0 m9 Y$ m0 h0 q# b9 @, `
part := @.transpOrder;
$ @$ M" }" }% W1 R1 R7 S# s part.move(@);-- load part4 `) ]; P+ \) T" `
@.CurrIcon := "load";9 m8 k) X* z* g4 |8 ]; z
GlobalDistObj := part.globDestination;8 p6 t% s2 m! \, Q
assignLObj := rgmanager.rgAssignL;% A+ q. R% Y) Y$ W
row := assignLObj.getRowNo(GlobalDistObj);$ W/ _, h8 x" l+ `$ [. f) X
if Row = -1 then -- since 70- l4 n& k* I/ R
if lan=1 then7 S M5 k- T9 {; o; d6 J9 R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 a* y) ?. L) r x& N* N
to_str("in der Andockstation: \"",?.~.name,"\""));3 N- T+ E+ B+ O {4 @; A O; b1 H
else
) p9 d' t3 v( }) E, }: h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ U$ u/ ?5 b+ N6 H% M
to_str("in docking station: \"",?.~.name,"\"")); # a1 g' R) m: m' Z
end;/ V, B, P& P. x; ~# |: n
else5 n8 W; t5 \1 ~% A; B
@.Destination := assignLObj[1,row];5 g9 r+ ~- A5 T
end; 1 W0 @3 @ j" d7 A4 ?( u' N, L! n
newDirection(@);8 }$ d0 b0 z# J1 _$ p
@.HasOrder := true;
/ U' A! U4 n4 S9 A/ t end;
, [0 r4 [2 n" Z7 a: I. h, a2 q end;5 F; @9 l+ h) v( H" m/ t( c4 V
end; -- of the method0 F! Y: j9 J% ~0 t. I4 r
|