/* called by: entrance ctrl of the object 'track'
7 Y7 w9 `! T. H3 d1 V! f*/
7 e5 I$ M7 |) xis
6 |% s/ Z3 u3 R. n3 u1 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;( L+ p" g0 }8 i; m
do' f; D2 n, @" {+ F: l$ u
Lan := rootfolder.Internal.Tools.AOLlanguage;
! ^' [/ ]' K8 [- Y- M if current = @.Destination -- else return! ^; i; y/ p" o; t
then
$ J# e z2 H* J2 G4 U: U3 Y @.Destination := void;
4 F7 G! \9 T7 d2 q if @.occupied then
% l3 ?) H5 M2 L part := @.cont;
2 X& X6 |0 U* H4 j" I& w @.transpOrder := void;
' C* p# ? U" ^8 i: s% h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 `8 Q$ z l4 U+ R# \ @,root.eventcontroller.simTime);
; E6 w, [" H2 o! L @.HasOrder := false;
( J- [7 c0 T* z1 ^# f9 M5 P5 U" [ @.DrivingHome := true;( u+ S N% H! l6 ~! d
rgManager.tryToStartTransOrder;( l1 C I* A" L6 O# l
if @.Destination = void
, p- x! R- p$ v6 n+ \; ^' S then -- no transport order for vehicle @
; ~+ ^& q7 A7 @: z0 Y3 e) D8 G @.Destination :=
2 c8 e% n$ f7 Z3 g8 {" x rgManager.nearestFreeStation(@,track.~);
+ y- `7 x$ E7 D& K newDirection(@);
" } ?3 S' @; y$ t1 | if @.Destination /= void then
2 f$ s% k* F/ S1 x @.Destination.NumReservation :=9 X0 E! E6 B7 A; k
@.Destination.NumReservation + 1;
1 ], h6 L4 f6 @. A" }* _ end;1 z u0 {# I7 ~9 O( \+ a
@.CurrIcon := "drivingHome";6 p. m3 @, I$ Z5 ~8 A2 }! c
@.DrivingHome := true;4 r, S+ e G- b! f; H$ s
end;
4 o) N4 j2 [- J6 M+ C' Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station; y1 s0 W: m+ D5 r, F$ n: Z
part := @.transpOrder;
& {' Z, F# S5 q" N- D; Z part.move(@);-- load part
0 A4 G7 w3 M. Z @2 X6 {3 d- { @.CurrIcon := "load";5 L% [3 Y! W! H" w; K
GlobalDistObj := part.globDestination;
" S3 a! O) x4 C& S assignLObj := rgmanager.rgAssignL;7 U/ O2 k! B5 d8 }* a( k
row := assignLObj.getRowNo(GlobalDistObj);
, ?* I/ C. I6 G1 w' u if Row = -1 then -- since 70
; V3 w. f$ A8 l+ } if lan=1 then' q+ g0 ]/ f+ @; g9 H% u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 z' w# R' L+ F' q2 ^ to_str("in der Andockstation: \"",?.~.name,"\""));8 o/ T! M- `2 o: U% l
else" ~, U+ G; m& O1 e* j# m: @3 e. r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% V. V& [- M/ g
to_str("in docking station: \"",?.~.name,"\"")); f- b' @2 p H) T) G% h( [
end;
X, ] x% z, V; s; {& X else: n, d; t7 r7 {9 ^3 M
@.Destination := assignLObj[1,row];" ~& |, E9 N! A+ [
end; , `. I! h) d. c& h& W. ~
newDirection(@);* [/ s9 Y& k, c
@.HasOrder := true;
8 m. y: m( h% u/ D end;
# t- V' J/ d L3 p- N; A6 E end;1 T# K$ d" R( t" g% B
end; -- of the method
8 c% A. z, P# n! H3 Q d5 R7 U |