/* called by: entrance ctrl of the object 'track'7 l! h3 M$ {5 x; ?7 T3 `- j1 n
*/
( Q8 E* L5 O2 E* u6 Cis; w0 H# ~5 H4 e- c: n: N! z% H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 s7 y2 t9 j S: o0 m( j
do) m( |3 g' S$ }2 H( }5 p, g
Lan := rootfolder.Internal.Tools.AOLlanguage;- z# V/ @$ R7 J8 }
if current = @.Destination -- else return
8 I4 i; u; L( ?( k1 S) X) |' K then4 R; h# f5 Q3 \$ a$ Y F+ B
@.Destination := void;
, G0 e! Q) g5 }+ i3 H if @.occupied then7 t T2 f. W) Z" Z7 T w' p- b S, W
part := @.cont;
& R) O- u! e% _7 s @.transpOrder := void;
# V' X" t0 A$ W- i# T b% @+ j! B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 J' J: E8 u* @8 D. c* L$ M9 t( a( k
@,root.eventcontroller.simTime);
1 H1 }4 z$ y" X/ h) i @.HasOrder := false;7 U0 c5 p N8 `/ s: ?6 S, w
@.DrivingHome := true;
$ T- O# y3 D/ H: S rgManager.tryToStartTransOrder;1 R9 Q" p; X6 F8 H+ F
if @.Destination = void
, T& B4 T$ e2 p: O then -- no transport order for vehicle @% N5 V9 }9 G( I8 Q: R( t
@.Destination :=
" @! g8 |" k s- m rgManager.nearestFreeStation(@,track.~);$ w3 V2 ]* M6 P6 J
newDirection(@); 9 q; ]* ]9 \, k, V
if @.Destination /= void then
8 `* r- c, O. k% P4 a# Z4 S @.Destination.NumReservation :=* M" P7 n0 Z7 A$ u0 O9 {$ t
@.Destination.NumReservation + 1;7 l; V5 \/ n% S$ e$ R5 C+ d; t
end;# k' @" j+ C. o; f- P+ g. Q. u& M
@.CurrIcon := "drivingHome";& X( @! |# s/ }% B& F, a0 e) v
@.DrivingHome := true;, D( V3 _( `' k y |+ z/ C
end;
) A+ B* k3 J5 e" W6 ]9 U1 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- l8 N0 u: g K% w* Z5 d part := @.transpOrder;
2 O" Q2 O# p3 W) ]& h( k part.move(@);-- load part; t' ~. L$ Y/ j8 l7 j6 ^
@.CurrIcon := "load";
8 t" p2 ^( Y- k6 Z GlobalDistObj := part.globDestination; Z7 @* G& B! o2 z8 T7 ^
assignLObj := rgmanager.rgAssignL;
% J; c. C; ]6 h5 h- S row := assignLObj.getRowNo(GlobalDistObj);
/ |$ H5 n. W+ |/ i if Row = -1 then -- since 70
% e7 v* y! C! i5 u. d* l. Z- Q if lan=1 then$ ^. ^# Z$ n' ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ B0 ^ F' b+ f to_str("in der Andockstation: \"",?.~.name,"\""));
8 D& H% E) O& d# I n3 U& z else$ g: T v3 S, _4 t+ Z, w0 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. f7 l% s) A) |& `0 k to_str("in docking station: \"",?.~.name,"\""));
( o- \9 F, E S: W end;
2 K* p; r2 x9 E7 t8 ]4 b( A0 ~( C& ?" Z else
3 C" s+ E7 r; N @.Destination := assignLObj[1,row];" I6 c1 Q- ~0 C% ~# T( G+ X t
end;
% \$ S0 w+ K' A9 i: g/ o( c newDirection(@);
& k" @7 f# }5 V/ j9 A, Y8 U @.HasOrder := true;
' b$ [8 Q) A7 R" I end;
, y' U) i% y. U end;5 U2 c1 b) ]$ T' ]' |
end; -- of the method
$ N4 {' f2 R9 _6 B4 c7 h6 F |