/* called by: entrance ctrl of the object 'track' s! n- Q8 ^! l$ S$ L9 a
*/$ I0 L& P" X7 P0 X9 k+ \7 ]
is
: U' z% d0 W5 J( d* J part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ |7 K6 v' c/ C6 n
do9 i3 w- l1 G, E- S+ l! [
Lan := rootfolder.Internal.Tools.AOLlanguage;
- g* w- M1 ~9 i0 } if current = @.Destination -- else return! c4 {' t! m* i x: a1 {' @
then
. n2 D5 y: N2 ] l, {5 p# e @.Destination := void;7 Y9 H: E& J# m/ S& H
if @.occupied then
+ d4 \( n p8 F8 u8 P) e part := @.cont;
% g$ ^( C D- Y3 C2 P& A+ V @.transpOrder := void;* l9 o e" f1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; Y6 H* k5 ]1 R- n' w
@,root.eventcontroller.simTime);( F* I$ v; L. [9 @8 l" a, |
@.HasOrder := false;
D* K* | b( A, ~( w) X9 \. ^ @.DrivingHome := true;
+ O6 Z( M2 X: e9 r) `4 C rgManager.tryToStartTransOrder;. M7 k1 O5 E! A
if @.Destination = void
# o& n) ~5 G" G; I/ X then -- no transport order for vehicle @, s9 K5 q4 `( t$ E$ M9 j
@.Destination :=; x2 b& {6 L% m% M% _* J
rgManager.nearestFreeStation(@,track.~);: q( Z) Y( D8 _% K# @' B/ m# p/ N& Y
newDirection(@); 3 a4 ?" Y& h$ {. d; r
if @.Destination /= void then' K2 _. v5 e. a: E! ^1 x/ M: `
@.Destination.NumReservation :=
$ \3 f! m0 c4 K. e9 g @.Destination.NumReservation + 1;
* A& f# k1 g5 H/ y- z- ?+ I end;& U7 V9 v/ {* K& a
@.CurrIcon := "drivingHome";, z/ E' k; s7 V* {0 Z- G
@.DrivingHome := true;1 N! j. w% _( C" r; e9 O% g2 u* q% {
end;; O" I: @0 Z0 o2 ]- L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: S/ N. I X" G5 R; M* \ part := @.transpOrder;
# f( z* r* i: _8 p$ W part.move(@);-- load part
9 P# o: v- T' K$ {6 x. q8 X @.CurrIcon := "load";5 q. u2 x7 f2 X0 @5 X7 ~ ]
GlobalDistObj := part.globDestination;5 I' K- i- g" k2 L1 H
assignLObj := rgmanager.rgAssignL;
- B- a* X% o+ X& H7 m$ }0 f row := assignLObj.getRowNo(GlobalDistObj);
. C0 E- }4 u) [8 _1 \ if Row = -1 then -- since 704 O3 S3 I# C9 L& o
if lan=1 then4 ]6 c0 Y: G! m! u! i; i; x0 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- J J+ y/ T% H" E5 V5 E
to_str("in der Andockstation: \"",?.~.name,"\""));" X$ l$ ^& l! x2 D9 w- f
else
. ]) {# x# e$ a) O: C. F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ~5 r6 m$ Q, f- F0 K: I to_str("in docking station: \"",?.~.name,"\""));
/ Y2 k" q* L. B end;2 ]: r! T" l- w q: N3 m( n9 T
else
+ x% h$ V2 y* B. A0 p$ t @.Destination := assignLObj[1,row];
6 I8 Z5 k1 A0 O' `. C end;
) G: f4 v1 b4 t. W newDirection(@);
, i. V6 P: n8 Y# z0 L @.HasOrder := true;9 M9 \& b* F8 D4 @% q; M- G
end;
8 D$ u& F: J- e4 A3 h* y$ Q2 K end;" o+ _, w+ v* E
end; -- of the method( z% P5 X8 ~3 _5 P2 ^8 R, c: P
|