/* called by: entrance ctrl of the object 'track'6 h( h6 M9 B! n; j. |6 Q
*/& z- }! P7 E# @$ s0 d& e, e9 _
is
' u h: x5 h5 f$ a. W, k part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ l: |3 C* ^3 B/ e0 }1 M
do
6 z0 {1 V% ?% C Lan := rootfolder.Internal.Tools.AOLlanguage;$ y+ ]! B8 T8 W Q1 z6 j
if current = @.Destination -- else return
5 R7 A- ?5 ^- R; @3 \ s. q. m then
5 Z# {& ~3 W6 T' y1 F) a+ Y @.Destination := void;. T/ r: k* f; Q d4 M/ C
if @.occupied then
8 S6 M' }* @/ O, I% i' G part := @.cont;
, Y1 b9 N- `) C. R( c" l% z @.transpOrder := void;8 O( F3 v8 G. s) P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 F* `) W* i2 e$ Y0 @) M3 w
@,root.eventcontroller.simTime);5 n# C3 Y: P( C/ ]
@.HasOrder := false;9 _) ~, m7 p; M
@.DrivingHome := true;8 e* w0 a; B. G0 ~8 S$ s& c1 t
rgManager.tryToStartTransOrder;* `8 [) }0 `. ?# W7 V
if @.Destination = void
+ @- j/ r( r* Y then -- no transport order for vehicle @
2 T5 y) N) W" Z) V3 U @.Destination :=' r: @; P+ `7 z, J0 D7 G% w
rgManager.nearestFreeStation(@,track.~);& |' L* A6 G6 ]3 N" X' F2 T
newDirection(@);
' \$ m! L% p4 h! F# f if @.Destination /= void then
) A! R, r K1 Y5 a @.Destination.NumReservation :=
4 e* u" q4 J- {/ ` @.Destination.NumReservation + 1;
& s1 D7 j! s- ?5 k6 t# N end;
) I( a! I1 {* W2 Z, J4 E% Q @.CurrIcon := "drivingHome";
6 }1 ^0 f6 ~! m1 b4 Q& ~) I @.DrivingHome := true;1 t1 g9 ?$ }; C
end;5 q) r" e+ S" y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 z8 l; c# }0 q part := @.transpOrder;
- p8 \( m8 e9 h/ f- [3 E2 g/ [ part.move(@);-- load part
8 F5 D: T% u8 ] @.CurrIcon := "load";
" B9 w% x+ E' Z' h- A/ g GlobalDistObj := part.globDestination;; Z1 J- j3 }" |7 j7 w
assignLObj := rgmanager.rgAssignL;( a8 m. v8 V& Y- E- z% u
row := assignLObj.getRowNo(GlobalDistObj);2 P0 _6 G% N& p }& v+ r+ h; M' i8 \% H
if Row = -1 then -- since 70* S3 k6 G( q" c3 w' s1 A
if lan=1 then
, {2 E9 i( [; I; P: ]: r% P" E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 C2 U$ g, M( W# \
to_str("in der Andockstation: \"",?.~.name,"\""));
$ v" P3 k2 ^- E, I0 l( Z else/ N M# n% w, J4 j6 u# W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 M. t, ^9 l5 g
to_str("in docking station: \"",?.~.name,"\""));
9 Z9 {) c' ? R# c: P end;
9 |8 G! K$ Z# w+ _7 `& O else
4 G( j4 F2 w, a& d4 X, Y @.Destination := assignLObj[1,row]; a" q& S' i9 c9 b, g! p" l
end; $ n+ c- e6 Y8 H, ?- v. P* A
newDirection(@);1 y2 _% X5 I1 c* h6 h
@.HasOrder := true;6 Y/ o8 H; s# V" u$ ? B
end;$ D; u- G1 B; Z4 C! P
end;
& N5 h! m* n7 t% u: s/ i( K. Uend; -- of the method' ?8 p( @7 o# g; `2 o" T
|