/* called by: entrance ctrl of the object 'track'
3 F( O7 R" j2 o1 q*/7 [; R& v' \5 l) J+ Q( ?5 D: u N/ }
is* [6 i' U7 Z; {; W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 B% {6 g; @' y( s
do8 q( N; v$ d8 S$ v0 f- u: h
Lan := rootfolder.Internal.Tools.AOLlanguage;+ u/ n$ ~9 x" i) U6 h' G* C4 v
if current = @.Destination -- else return' J7 w- z6 b: G$ b
then
$ T1 }. L( S1 S! C$ E @.Destination := void;
! C) ?. F+ ^, o% O% X if @.occupied then A. [1 b# X5 w% X
part := @.cont;
9 Q8 X1 Q6 P; @* r+ Q @.transpOrder := void;9 g* q( k1 z2 P$ i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 u4 v5 C9 A, `1 A6 b @,root.eventcontroller.simTime);
- l# X9 g2 `( e( n8 ]0 p# B @.HasOrder := false;4 C/ i. t/ K% l+ D& @
@.DrivingHome := true;
2 a% X& m1 ~2 H p9 O rgManager.tryToStartTransOrder;( H+ V2 S3 K- e% ]: {( V
if @.Destination = void
3 Y. |* a- P4 d) P j then -- no transport order for vehicle @
$ I! ]8 U3 @3 [ L$ X @.Destination :=
$ c5 }, r- O1 c rgManager.nearestFreeStation(@,track.~);
3 W4 E$ Y8 }: j1 O newDirection(@);
# M. U/ W7 U; D5 J if @.Destination /= void then
" i$ N/ x4 F6 W0 p( |+ y @.Destination.NumReservation :=( N! T- j1 p1 F" d8 x7 `
@.Destination.NumReservation + 1;+ y% j* k% h! }6 L* o4 l$ S, h
end;
1 ]( a: q S- e& v& [6 Y5 O @.CurrIcon := "drivingHome";; k! q9 y! M1 W: a. l
@.DrivingHome := true;7 |1 N# s0 g4 [' b
end;
1 y& l, Z! T0 f9 ^) M* z; j- O0 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 C u, S/ G0 b! ^( F# Q5 i
part := @.transpOrder;. ~7 d/ K, Z! M9 y2 f9 a1 R
part.move(@);-- load part
* k6 \+ e* n# E( j. q @.CurrIcon := "load";8 b" R! R$ ?2 i3 Q
GlobalDistObj := part.globDestination;
Q J7 O3 ]! r, Z" J- f assignLObj := rgmanager.rgAssignL;
h3 [9 A& U. | J! R9 @ row := assignLObj.getRowNo(GlobalDistObj);
6 m6 ~6 L2 V! e9 _/ m% { if Row = -1 then -- since 70" j+ ^) ?! ^! _/ G6 V5 }& i
if lan=1 then7 b+ g' L M8 {0 [8 N; }* {6 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# C/ ]1 @4 r# T0 q# h$ j5 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
. ~! y& G8 e; g! G( h# A* F7 o: d else
& L- l: q. x% t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 W t% x0 q$ E- y to_str("in docking station: \"",?.~.name,"\""));
d( K5 k) q1 P! O7 \( l end;
, N- P+ H* B. B1 W R else% j& T/ b' ]( O' b( a3 V
@.Destination := assignLObj[1,row]; V8 Z3 `3 _4 C/ Z
end;
7 {# K/ b( D" e4 [. Z) E* A. b newDirection(@);
; O1 ^0 v8 Q0 E @.HasOrder := true;3 j: r \: k: r Y I9 Z' N
end;
* L0 X2 B2 m7 C end;; X' B2 s8 [* u! m: y6 i
end; -- of the method
# h/ ] h% g$ t$ y# @( K* q" V' v+ l |