/* called by: entrance ctrl of the object 'track'# N4 s- P. e6 z: O
*/
1 T; i" B) Q! B% Dis$ `. ]& R+ D$ g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' d2 q7 B& K8 Qdo
5 w' U) t- v' P$ H0 J: r Lan := rootfolder.Internal.Tools.AOLlanguage;
4 a7 W) K8 B0 j$ d2 Y1 I if current = @.Destination -- else return
- q4 j4 z! ^1 s/ v) [ then* i2 I0 V) j& m& e4 [7 @8 G
@.Destination := void;" ?& [3 J7 _) n+ j2 @
if @.occupied then4 A4 f7 T3 U$ N: @
part := @.cont;
3 l3 k" c) A$ ] @.transpOrder := void;
+ G* G9 m$ o$ G1 B0 D- d9 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 p) W7 m* i' q7 x7 y
@,root.eventcontroller.simTime);
s6 V+ P1 s/ ?5 q. i @.HasOrder := false;! e' R+ a- a4 U3 X& Y/ W) V( q
@.DrivingHome := true;
$ R% l) R3 U. ~# H- Z- c% } rgManager.tryToStartTransOrder;
5 R5 `9 D1 \8 G0 i% }1 { if @.Destination = void
2 B. ?) [; Z, ^& O! { then -- no transport order for vehicle @
& b n6 T+ |# `0 X2 c3 z# F @.Destination :=+ {" a2 k" [# j5 |! A
rgManager.nearestFreeStation(@,track.~);3 P! j4 l4 y9 v( d# @1 G2 _. V* w
newDirection(@);
" o' [; @2 o# H( Q/ M7 b if @.Destination /= void then& y8 K. o- L1 c
@.Destination.NumReservation :=
3 X* I( x) B& l' c: p6 p @.Destination.NumReservation + 1;
4 e# ^* e0 h/ D4 |: Y5 r& M' u- L end;9 n2 Y( d: y( j8 u$ v/ S
@.CurrIcon := "drivingHome";1 }, N& E# o; d$ W5 T) j) B8 t
@.DrivingHome := true;
; @- f% T# p7 y& {8 u, k end;& `0 n4 E6 q' V6 H, t* ~ z( G4 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! O4 R5 E+ L8 Z part := @.transpOrder;% L' \: ^+ Q2 W4 {4 O
part.move(@);-- load part
. j/ ~* P$ x- a5 [# C( { @.CurrIcon := "load";
6 ^: A( x! b! e3 K GlobalDistObj := part.globDestination;
* ?+ ~/ L% G, [& g$ n% Q assignLObj := rgmanager.rgAssignL;7 k) ^- ^; e: }) W* V
row := assignLObj.getRowNo(GlobalDistObj);: T% l/ X( H+ u' w/ o3 ?. \
if Row = -1 then -- since 70
4 U- \6 l6 U" t" @4 q, r if lan=1 then- A" X: j% \1 |) s1 Y S" o( {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 n$ P$ z: q) [+ X$ D to_str("in der Andockstation: \"",?.~.name,"\""));
4 P6 I! R0 v g3 d- n else
& f/ @; Y" |9 D; ]# K: p( I7 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 O- D* o& c4 B9 _
to_str("in docking station: \"",?.~.name,"\""));
a+ D; N4 W7 ?- b5 J end;9 I! m4 w( [0 S, f4 P
else$ y- Y6 D# h' [$ I2 r- R7 a% X6 |
@.Destination := assignLObj[1,row];
+ D) d8 y) Z9 X; Y end;
2 `8 I. V( f' ^5 s newDirection(@);* l7 m; s6 {( @. K3 _
@.HasOrder := true;
- M- x) F' y) f9 L& G" K6 Z" ^ end;1 l: v T/ C( S/ O* ]
end;
4 M" Q ~9 S3 c3 c, ]& Nend; -- of the method+ G8 C0 c( [ j+ p j1 y5 P
|