/* called by: entrance ctrl of the object 'track'
4 g- b% Z" B0 t! Q*/: l, y9 W2 l. a9 l: T: F8 Z, p6 R
is
: _ s% L3 {0 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# O+ z( u+ m% Q! Ndo; \/ W. I8 l s1 [
Lan := rootfolder.Internal.Tools.AOLlanguage;
" g! W$ r- L3 F4 H if current = @.Destination -- else return* Z5 m7 t, A T' y) T
then5 [/ B! I8 Z! r9 ?$ g" z6 Q
@.Destination := void;3 ^2 |% e. Z' j2 P7 ]
if @.occupied then" P$ {0 o0 |( |6 l% N' H
part := @.cont;
) R6 B6 ^' B1 w' Z# g @.transpOrder := void;! y: D* f0 A+ E2 d7 y- ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 e! V0 ?- F2 |+ I
@,root.eventcontroller.simTime);6 g* [& G% ]) m6 x6 V1 S
@.HasOrder := false;+ m' _5 x" [' n4 }, i4 g7 Z
@.DrivingHome := true;
6 u/ j1 f, q, O* J7 Q8 s$ W rgManager.tryToStartTransOrder;
/ G) z" g) w! H8 R if @.Destination = void5 g8 m- g6 o1 c. q
then -- no transport order for vehicle @
1 g9 U) ?, R* V- W# x @.Destination :=
6 i4 H/ I# o7 o, d* R3 W rgManager.nearestFreeStation(@,track.~);1 Z( O: g/ c d- p% v2 \
newDirection(@); : Y/ r( t, s0 `# E- z- i
if @.Destination /= void then
, o' q6 l; Q. Z @.Destination.NumReservation :=
( n4 M# w) B6 O! D% S @.Destination.NumReservation + 1;
0 V% f, h1 ]6 q! |. @3 S end;1 w {, m* |5 I" y4 {
@.CurrIcon := "drivingHome";
. o* I) O7 N: f! C @.DrivingHome := true;' C. i% ]! r `. A
end;
! }* _" p* _8 e. g) t3 M$ _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station. Y3 {' t+ t0 k {7 @* i
part := @.transpOrder;
- f& E6 F0 [, M! p& e+ y part.move(@);-- load part
4 v6 x7 c( `7 r2 W, p( _! r$ v @.CurrIcon := "load";' U' r) g/ L6 s1 w
GlobalDistObj := part.globDestination;/ g6 Q$ r* h& T/ K& X7 o c" r/ X7 i
assignLObj := rgmanager.rgAssignL;
; a5 i. F; x/ M% f) ]0 r row := assignLObj.getRowNo(GlobalDistObj);
/ W6 `# A( e# k if Row = -1 then -- since 70
5 B2 D8 r/ }8 L if lan=1 then
! a, p' N, n8 e6 ~, K% S9 d. a( Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; T( }5 W0 N! F4 Y; ~5 N) h to_str("in der Andockstation: \"",?.~.name,"\""));
. A) p% L" U* V6 d. f @ else& d7 ?( y8 a6 \* H$ F2 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ l. t4 n4 u$ O* L8 v+ N to_str("in docking station: \"",?.~.name,"\""));
1 M# c2 G$ j. t3 z7 d end;* A( A' M. m z# B$ d8 n+ X3 \4 [7 D! ?# ]
else% X+ A7 P) u5 {* `, m& J' D9 T
@.Destination := assignLObj[1,row];: S. q1 c8 F& a3 ]- Z1 ]- m9 O
end;
( ^' A: x# E6 a newDirection(@);4 n" j0 }" |5 m1 L+ A2 S
@.HasOrder := true;) [* U+ S% U8 N( b7 Y: I
end;
( Z7 ^/ V9 \9 a6 s( J6 Z end;
/ P- n7 u; R x$ q: n; Q. Qend; -- of the method
3 j6 y7 ?7 S6 l% ~+ w4 ~ |