/* called by: entrance ctrl of the object 'track'
3 M" ^3 w4 @4 ^6 x1 p*/
$ ?: Q2 O U1 f8 xis; d" Z/ r L" A& X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 J8 Q/ h3 P: w# i; V, L
do3 `0 T; ~6 {" F
Lan := rootfolder.Internal.Tools.AOLlanguage;! E8 W% F7 ]# C
if current = @.Destination -- else return3 r' C+ w6 j! J C4 l/ U @. E U
then
6 n f! e# X6 g* T( C% x0 ?2 B @.Destination := void;
: F2 E- z* m( D" K! P- p" B if @.occupied then/ r, E# g7 W P9 Z( i
part := @.cont;
( g5 D: J8 Y& x* s" T @.transpOrder := void;7 M1 c- z0 p! K8 O& c. e! s" |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 F0 {3 Q9 n& P1 |, S |2 x5 c
@,root.eventcontroller.simTime);
' z, i5 |/ O5 k& [9 A @.HasOrder := false;3 U4 D9 X o& f! s$ I& u
@.DrivingHome := true;
7 @! n! ~3 ?4 r" l0 t( j; C4 u rgManager.tryToStartTransOrder;% F+ r9 P( |$ M* Z
if @.Destination = void
4 A8 R- B+ o1 \( J$ [ c0 K then -- no transport order for vehicle @( m& O) l1 f0 K v* W
@.Destination :=8 o9 h" T" J0 ^% x5 Z. D0 J
rgManager.nearestFreeStation(@,track.~);
: U7 G5 R1 L2 @8 E- S" A newDirection(@); . s3 B% |1 }7 S! R. e( |. e' R
if @.Destination /= void then( _9 {. @" ~" I6 X
@.Destination.NumReservation :=; C% U5 j9 x" }9 `9 F: J
@.Destination.NumReservation + 1;$ j3 W3 j8 m' l% C3 Q4 \5 o
end;
9 e; n( l! Y. H# l# B$ G1 R @.CurrIcon := "drivingHome";% B+ s* Z4 @: G/ U @2 [6 n
@.DrivingHome := true;6 Z* k/ i; W. C& s* H
end;0 V) q+ F- i* n) P! o' T% ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 N1 C" v/ v# e* D part := @.transpOrder;
8 ?% E! A: E: L3 @, c! g+ x8 B2 P part.move(@);-- load part
0 G4 q+ g- j" w: X4 E0 E! i2 e @.CurrIcon := "load";- ~( K/ I: Y5 n1 C: {" @. X
GlobalDistObj := part.globDestination;5 U3 d. U6 h& C
assignLObj := rgmanager.rgAssignL;
) |8 O) A- _* y4 o$ P, G row := assignLObj.getRowNo(GlobalDistObj);
" G5 I9 Q* O5 e1 ] if Row = -1 then -- since 70
5 i2 Z% l8 H- ]3 R' E$ y if lan=1 then
7 }, s8 V& Q5 n( R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s( N. Z3 u* |; ? to_str("in der Andockstation: \"",?.~.name,"\""));& z$ P% z; N, k) L: a+ a
else3 Y7 h# }. w: K+ L- z. Z# S- r8 K/ \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, a: L8 v" ]" J4 J( h to_str("in docking station: \"",?.~.name,"\"")); 5 C0 O3 [' V% I) X0 w8 {/ q
end;
& e+ _5 w" x/ x& M; [9 e, V else+ @0 L3 F/ D6 P& `
@.Destination := assignLObj[1,row];3 x* W$ a. l- Q% K+ t( A9 d# o
end; # K2 S3 @! S0 D$ ]/ p& b; T ~$ {
newDirection(@);8 L$ ~5 s7 e; A) L
@.HasOrder := true;
* [9 p. V4 t! H7 H# r) U7 e end;
; m0 s3 g5 ~8 [8 T- u: B end;; w+ V/ J" A1 L
end; -- of the method
/ l+ F& i8 h% G, C$ r* R |