/* called by: entrance ctrl of the object 'track', H- [$ F S3 S$ K! ]
*/
3 k0 B" ^5 c. y; x# R7 {is! O. n4 O2 ~4 }8 m: S/ v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 \* @& ~+ q& q$ _, Ldo
$ d; z1 M# N# J9 n( `! O Lan := rootfolder.Internal.Tools.AOLlanguage;
( e3 K8 m' _$ [; E' d if current = @.Destination -- else return
1 _. }! O' W+ ?; {/ ^ then
( ?7 ?# N/ ~' Q: |$ J @.Destination := void;
+ u: g8 `7 j1 ]- H; x. H" y- {" G if @.occupied then
. R* ^- y1 H9 | part := @.cont;4 }$ N$ w# L e4 E
@.transpOrder := void;9 u- y' `; P l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. c6 i6 Z. O& x+ j
@,root.eventcontroller.simTime);$ P0 B: C$ c5 f; v3 F
@.HasOrder := false;! }2 Y' D' W& d% m* o! ^
@.DrivingHome := true;
! I, F5 {! l4 ?% k rgManager.tryToStartTransOrder;& \& b* J5 I& x& B- Q
if @.Destination = void
; E" I5 u2 N" y8 }% `" m then -- no transport order for vehicle @# \# T2 s4 E2 L2 x. G% [
@.Destination :=: P8 M' H! `# a/ l1 y" X2 |8 @4 ]
rgManager.nearestFreeStation(@,track.~);9 ~2 C+ c8 W) K5 ?, T
newDirection(@); 9 M% C, m9 w8 d/ [- `, s
if @.Destination /= void then% |3 q3 F" _8 k! G6 E5 j
@.Destination.NumReservation :=& X: E; n) i7 ]. b/ A% _2 Y
@.Destination.NumReservation + 1;4 R* ?$ K+ F& [" |
end;
0 }4 a& G& S+ f$ r6 M @.CurrIcon := "drivingHome";8 Q: }% {$ r2 w$ W! ?
@.DrivingHome := true;
+ k k$ J2 [% k end;& B/ O* ~0 j, @1 r+ o- \& g) B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 K4 W/ ?5 Z% X% [" F part := @.transpOrder;+ K9 U' q" c" U2 y
part.move(@);-- load part; _" U9 Y/ T/ F& `8 V5 }( g
@.CurrIcon := "load";6 r* s* z* O$ ^. ?
GlobalDistObj := part.globDestination;
; E6 f% c% u, v9 Z assignLObj := rgmanager.rgAssignL;5 B9 R9 o/ g2 h$ q# o
row := assignLObj.getRowNo(GlobalDistObj);
8 `+ H! H- s( [4 [; A, k9 x: r if Row = -1 then -- since 70
" s& @3 D6 k# G if lan=1 then
5 G1 v$ H1 i( i) Q( D5 O" U! U- J8 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* d4 [" Y( f; ~5 a; j9 \( U | to_str("in der Andockstation: \"",?.~.name,"\""));4 r+ k4 u: f0 g! q
else1 Y. E# l; l6 n5 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [7 Q2 \% P8 R+ @% t% Q+ f
to_str("in docking station: \"",?.~.name,"\"")); 4 Y: M% @5 q% S0 ^
end;
% e" k) p8 ?% j* J. e+ D' [ else9 T |3 e) J+ `# S$ j' s) T% E
@.Destination := assignLObj[1,row];/ d+ s5 k4 ~ W) V o( j4 {
end; 7 `3 e( E9 _. V4 D0 \' {
newDirection(@);
9 B# Z; F# z7 ~2 u @.HasOrder := true;
2 u1 K6 B4 p; w( }. @# v6 z6 m end;
q, ?/ k8 S( r% W8 V$ N8 p5 j$ u% t end;: Z9 R" V0 e& X+ n# J; {$ O: ^
end; -- of the method+ m3 V m! _6 ], j. E1 m5 h) D
|