/* called by: entrance ctrl of the object 'track'
" O5 |/ F: ^; J& x9 o: U*/. g0 m" Y/ K) C
is
- W" w- B) V8 }; r2 X) R5 A) R7 R8 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 k" g$ w- j, udo
% q! Y3 o! V( B* Y8 {0 v5 O8 |* ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
( {. _- T/ \8 {' g4 k3 M if current = @.Destination -- else return% e' X* v! |( P: F. S" C9 w
then
2 S" { U4 z1 D# I @.Destination := void;- `0 p; D) U7 P/ P
if @.occupied then, Q* N# j- c4 R$ A v& P6 c' u8 {
part := @.cont;. @% Y- n. d2 n0 {: W
@.transpOrder := void;# ^! O! P6 X: j, X9 k" q( k$ H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# h+ S/ @5 f/ x2 g' O @,root.eventcontroller.simTime);4 u* r) d. `- n
@.HasOrder := false;0 U9 Q* N C% z! i5 v+ e8 _
@.DrivingHome := true;- P$ w" r0 _1 W! B! H/ x
rgManager.tryToStartTransOrder;# M. X/ S0 c. c5 S( F* y& R
if @.Destination = void' i! z @9 t% K. }
then -- no transport order for vehicle @
$ J, N+ d. t6 ~* o/ s/ ] @.Destination :=
7 u. ^% f% ?* H rgManager.nearestFreeStation(@,track.~);! K8 i+ e* r4 H; F3 X
newDirection(@); 8 [3 D$ N3 q6 n$ h5 ^; s
if @.Destination /= void then3 ~4 e7 B; w6 }5 L0 }3 q
@.Destination.NumReservation :=6 |+ q* n U9 s! a. D3 [ X$ y. V
@.Destination.NumReservation + 1;
* ]3 i1 l$ |% v end;
, u! q: u# ^- ~6 Z+ ` @.CurrIcon := "drivingHome";
' N3 ~' D f' X @.DrivingHome := true;3 h4 T1 I5 H- z' N4 y# v+ {
end;
' K7 j# R& C9 @( O else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 H7 ~- T' K" j6 E6 @/ |
part := @.transpOrder;
2 u9 X. C. b8 x$ ]7 Y, e" H part.move(@);-- load part
/ A" I7 X% V* O, { @.CurrIcon := "load";5 [/ U4 l; T1 ~* i. Y6 O) B8 i& [' d/ ]
GlobalDistObj := part.globDestination;
/ x! u. |* J+ d assignLObj := rgmanager.rgAssignL;
$ `: b4 m: W" |! W5 g) n row := assignLObj.getRowNo(GlobalDistObj);
7 m( V. t( U2 e: k1 |$ v if Row = -1 then -- since 70
$ B' d. }7 E- s" ]& I* w if lan=1 then
( n* Y, n, K y ~; X* ~3 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& A) y) U' r6 n: o to_str("in der Andockstation: \"",?.~.name,"\""));
; v' N( G: ?. u% o: p else; r- q# q# s% ?2 J" P. x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& E! O) Z2 A7 C to_str("in docking station: \"",?.~.name,"\""));
9 D! u+ y" I$ K! h: E6 ~ end;) N. X# T& R# [& W: p- B( \
else2 i K* P- y7 F
@.Destination := assignLObj[1,row];4 Z& N2 x4 v( n0 V' o# x1 t( H1 q
end;
' S2 X' D( ]4 c4 R' {1 k. | newDirection(@);
& X) n. G1 R# \( M" ` @.HasOrder := true;
7 b+ y8 L& f, D0 J end;# q6 {3 C3 G! x& u: x
end;+ Z" k) z' g* m; x6 ?; p# {
end; -- of the method L* @4 g8 _* C! F& I" ^( N
|