/* called by: entrance ctrl of the object 'track'4 h+ Z) N4 b$ o; J3 V
*/
( O4 i! R. K' I) Zis
1 h' g* I5 S/ A7 m9 i. @. f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& ?# m- E2 B! Wdo* ~3 b+ ~4 B1 E! A
Lan := rootfolder.Internal.Tools.AOLlanguage;8 C- G2 t. t# j6 V5 X
if current = @.Destination -- else return* m" h/ J# ]8 M* _9 `! d, |
then
9 N) I4 D3 \0 N& x1 W8 [ T' H4 t0 D @.Destination := void;3 t- N* I/ v+ w9 B6 h7 u" l
if @.occupied then
9 o# `% F4 e6 I- p" G part := @.cont;
- }5 n) v# e. ]6 o: d; ^2 `* D @.transpOrder := void;
* ~7 E2 S2 c! u& ^) n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 b3 q1 Z; {& x( H @,root.eventcontroller.simTime);7 }* y4 K7 l: E$ [1 R
@.HasOrder := false;! e7 ]4 u0 {5 S5 @0 ?+ p
@.DrivingHome := true;
" y( I4 r9 W+ e rgManager.tryToStartTransOrder;4 x: f0 ~! t9 m7 {& D* p
if @.Destination = void
, y# g' I# D+ l7 D. } then -- no transport order for vehicle @% G( s y" w: A3 B' s7 h& I
@.Destination :=
: E* b9 m1 Q+ W rgManager.nearestFreeStation(@,track.~);4 a5 X, a. v; v3 j" u
newDirection(@); % }- i" \: t8 M! C0 p$ S c. P3 C
if @.Destination /= void then3 x3 I# E/ ]! u2 s4 G# ^- S
@.Destination.NumReservation :=2 W! C( S% Z8 r$ T2 j
@.Destination.NumReservation + 1;( C/ F- b' k- [& d
end;* M9 d% U3 ]. o5 t P
@.CurrIcon := "drivingHome";
) e4 Z% t1 ^4 k! B @.DrivingHome := true;
% A3 C9 T2 Z" x- y1 C2 E' Q* Y8 h end;
, O4 `+ S. V9 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% L0 ?3 D6 r$ H. m+ r6 f part := @.transpOrder;9 S8 W+ R$ P& Q: K* f
part.move(@);-- load part
% y+ Q1 ~9 ~. |; r @.CurrIcon := "load";
, p" r2 c& b) g0 w" Z0 X GlobalDistObj := part.globDestination;$ k8 Z, W6 \5 ?4 }3 q' u6 K9 N
assignLObj := rgmanager.rgAssignL;
. d! I+ ^3 ?- t e1 z row := assignLObj.getRowNo(GlobalDistObj);% f- ?3 y ]* l: V/ f) b
if Row = -1 then -- since 70" k0 ?4 ^0 b' q! j
if lan=1 then
5 b' O# E: Z2 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& M3 M9 [1 ?" o U
to_str("in der Andockstation: \"",?.~.name,"\""));. @4 _& X3 }* T% ~; T8 c; C2 a. T( Z
else
# ?8 Q) _% w, z) v4 n9 [& a/ G! ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" ^: [( i+ ?6 g" h to_str("in docking station: \"",?.~.name,"\"")); * x C0 b$ M+ W% ^5 h! v; g
end;
# @& F: e2 b* a/ K- M2 X else
: P8 B3 k/ _' t* N @.Destination := assignLObj[1,row];
+ u# L3 J6 g! n) P3 g% _ end; # z( k& l% Q) t
newDirection(@);
9 [+ t5 m7 E( q! J O% o( y @.HasOrder := true; d$ n: X. p3 N3 k2 O4 V9 f- V
end;
3 O3 k1 A5 W. `8 z7 [4 H end;
4 q: Z d' S' i; i& U0 s) @end; -- of the method4 h, `/ i0 Y- u1 P4 H) i
|