/* called by: entrance ctrl of the object 'track'* B. q& U/ U2 h9 |
*/' S7 n6 H* t8 w& p; N) W6 @
is7 A0 i$ d7 U/ r8 |2 a- p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ k7 a2 \& x* d/ o Q+ Sdo
$ G0 R/ Q1 ~& h" X y Lan := rootfolder.Internal.Tools.AOLlanguage;
. u1 U& ~7 f) B2 V( K if current = @.Destination -- else return
1 S1 ]. D+ T% f" f/ W then
" E A$ w, E- Q# g: Z- x @.Destination := void;7 V4 w, Z0 J- {+ `+ t5 u
if @.occupied then9 [$ I/ c8 @/ W- o
part := @.cont;9 H2 C: R y/ p$ x) u
@.transpOrder := void;. G, g0 @- O o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' F- g [- b8 O. v7 Q
@,root.eventcontroller.simTime);) Z4 R9 z9 \' m
@.HasOrder := false;4 Z2 @. N4 }6 e- _1 Z5 D
@.DrivingHome := true;
S) Z6 |- t; {# v' M# Q6 n) R- E rgManager.tryToStartTransOrder;
0 t5 y- ~# ~! i' @ if @.Destination = void z% S3 r: u7 }/ Y. V
then -- no transport order for vehicle @
' a/ x# Y V, h0 H$ A& W @.Destination := x/ B$ h1 o6 q% i' S% ~+ r# w6 w
rgManager.nearestFreeStation(@,track.~); }0 s, o& ^) S N) H
newDirection(@);
- k- Y" B. X1 ^/ _# ~1 T5 o7 z7 f- ? A if @.Destination /= void then: S* O$ H" r" t- L! u8 X
@.Destination.NumReservation :=( T: z7 S$ S5 [* g+ x% r' C& E
@.Destination.NumReservation + 1;
7 o- \7 n3 H6 ]- [! @ end;
0 _% I" V& P% \2 u( w j' s/ J @.CurrIcon := "drivingHome";
! v& z. B' m. t4 M) [ @.DrivingHome := true;# B- I7 Q* G8 V W3 o% ^
end;
9 A: ~: v" d, B% Q7 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station- e+ b# C0 b7 a( b
part := @.transpOrder;# ~) [5 q, R N* @! h/ Q
part.move(@);-- load part
0 ?! k, {4 n, w A @.CurrIcon := "load";
0 ~0 i1 v% j3 b( N GlobalDistObj := part.globDestination;3 f0 _: u! W) E- J$ h
assignLObj := rgmanager.rgAssignL;& [. j9 A* ?- U+ o( Y4 T
row := assignLObj.getRowNo(GlobalDistObj);( k5 k0 j: Z2 P) U: Q
if Row = -1 then -- since 70
: Y% [% o- k* [; l- I if lan=1 then$ H& S- R. |5 h$ m1 y: f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
E: S, p7 S4 V to_str("in der Andockstation: \"",?.~.name,"\""));" R' ?9 _1 a3 P5 M8 S2 W6 b
else* |: G; G' P- O0 V; i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 {! u5 ~ z. f0 C& m* y6 r4 O" w! H to_str("in docking station: \"",?.~.name,"\""));
* b. Y8 B9 x: B) Q) t end;; u# D; k \; X$ J+ ]/ Y: k$ p! z3 T
else
* K8 x6 E# {- C @.Destination := assignLObj[1,row];
, N% _$ r% a$ V) V& G# H( _ end;
% y- ~* `6 W; x* I newDirection(@);! _* l" s# d: W p$ e5 z, C
@.HasOrder := true;7 a) H3 ?7 B. W R1 x
end;
% J+ N! u$ n5 e) h @) S1 D( } t end;
) s5 w- {4 T6 Y. oend; -- of the method
: a! V) V3 } B; h/ \$ m m |