/* called by: entrance ctrl of the object 'track'
/ ]$ D" ?2 y2 H2 Z*/
* B: A6 y. `. Z0 U. k) [; o1 I zis
a' [4 H8 b0 |6 a( k9 E/ M part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 x1 j! a6 |- _: y3 X# ]
do& e z1 d) [2 _' `3 y, F0 _
Lan := rootfolder.Internal.Tools.AOLlanguage;: Z b/ ?& i( M( U1 J* o# i
if current = @.Destination -- else return
/ L; z8 }' |% A then
8 d, z) I/ x" ~ @.Destination := void;9 R( U! B. O7 c/ L9 N1 r' X+ Z
if @.occupied then
. K/ U% p u. z; Y part := @.cont;
. L$ b7 _$ d: E8 I @.transpOrder := void;
! f) ~- Z, [* F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 Z' ]) }6 j6 \( l
@,root.eventcontroller.simTime);$ r2 I+ ?. J! V+ j, k5 {0 h
@.HasOrder := false;
j4 Y0 Z% {. L& k5 @% f @.DrivingHome := true;" G) G# e- s$ q0 C
rgManager.tryToStartTransOrder;
3 \: h8 V9 Q4 ?7 Y if @.Destination = void0 |0 g1 h9 ]3 m6 C3 |+ X8 q
then -- no transport order for vehicle @
9 B+ w8 [7 p/ j+ h9 F1 v/ S- T& R @.Destination :=
; o5 `5 h' j4 E" d m rgManager.nearestFreeStation(@,track.~);& J h( u b+ g: B
newDirection(@);
& l+ K1 I- G& s' H' _$ o- P if @.Destination /= void then7 n+ ]/ x$ k6 F+ L; b
@.Destination.NumReservation :=
6 X- w( M5 G# b5 T @.Destination.NumReservation + 1;8 w! C! i3 z; i3 g. G9 l
end;/ `1 A( p$ e7 R& ?; I; v+ {
@.CurrIcon := "drivingHome";) X9 t- s7 o$ ]) P R& t
@.DrivingHome := true;
+ z- ` c. s$ k$ \! t0 `$ F k end;
# l' [: P) A5 u0 ?' J* b: k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ G5 M' d) K5 t9 W0 i5 o/ r part := @.transpOrder;+ A+ u" _1 ] h! u* e! f
part.move(@);-- load part* e% h' k. N, O! `# Y& t }
@.CurrIcon := "load";' h# F' c" N+ O1 o6 H) h
GlobalDistObj := part.globDestination;" K$ M( ]% w' Z9 _
assignLObj := rgmanager.rgAssignL;
# l3 |$ S- e' o& P row := assignLObj.getRowNo(GlobalDistObj);
. m2 ]. Y9 L* x( \, j3 U. \) E) C if Row = -1 then -- since 704 g% ~) c( k6 Q. V8 o# H
if lan=1 then
0 v1 Q) ]$ m$ p6 @% p, U5 e* P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( |7 o. H3 w; l Y
to_str("in der Andockstation: \"",?.~.name,"\""));
1 P/ y: l- d- i; S0 i& j3 Z else
/ ]$ x. S5 \0 Q2 B7 v+ ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 T2 g/ y* Q% ], T to_str("in docking station: \"",?.~.name,"\""));
g1 ]' r; G6 w3 Q7 [ end;
9 O" ~4 j4 F9 A; C else
: b4 \! @& [8 r @.Destination := assignLObj[1,row];
5 |) G+ ~" f+ ^1 G* F% y" w$ |# d end;
0 Y# a0 p. f7 E newDirection(@);
& b3 Z1 {2 G* h$ x5 S% r @.HasOrder := true;5 x" I3 A* H& ^) H6 B# t; P- m
end;& Q% u" F& y. }" f
end;! i/ t$ Z9 q3 y) N/ X* s5 ~
end; -- of the method
" ]' Q( q6 S8 `; n% ~! q/ H, R |