/* called by: entrance ctrl of the object 'track': f6 [3 x, x8 t1 |4 y7 ~
*/4 T1 u6 i9 j2 F2 k' o O. k
is
% X0 F5 E" _- A/ N, G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ?; N# _ Y! H* q9 e) [" ido. ^; m4 ]; a. ~( ~
Lan := rootfolder.Internal.Tools.AOLlanguage;3 V) o) ?. k9 _3 |
if current = @.Destination -- else return& S% ]4 y) E* i9 B$ o( C, a
then; N8 E$ U2 l; p. i% k7 D* X
@.Destination := void;
0 a A7 F8 f6 f9 p' G4 H, h( \ if @.occupied then8 c% g+ ]0 _7 D
part := @.cont;
- o. ]; D' ]4 U6 s ~ o @.transpOrder := void;: n+ b, \+ V) }9 f! z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 g8 s, @, L" d$ ]3 G5 o; @) X @,root.eventcontroller.simTime);
. F6 b u9 b6 [- a1 _2 V, R @.HasOrder := false;
0 z2 i$ o2 n- q c4 b, G; a% }' g @.DrivingHome := true;
: ^& S4 d3 m8 y" r1 G1 I# m9 g8 ?+ Q rgManager.tryToStartTransOrder;' i4 {+ x1 y# j
if @.Destination = void
# k; ~; r5 b" } F+ F: g. {4 @ then -- no transport order for vehicle @
C+ B3 o7 U* j" F3 }1 s) y$ B% S h @.Destination :=
$ _/ Z* A+ Q1 ]& `( P) A8 h! O Z rgManager.nearestFreeStation(@,track.~);
+ R( P2 \* S0 M0 s$ j9 m/ j+ v newDirection(@); & T8 ^: |% u" J# L
if @.Destination /= void then
6 G/ ~; B f6 X2 z; K) D& `6 P. d @.Destination.NumReservation :=2 c, U+ r8 L9 q! R/ r! Q: T/ Q
@.Destination.NumReservation + 1;* w( h/ v0 }' h I
end;4 Z- p$ E+ |# v" R
@.CurrIcon := "drivingHome";$ g8 B# v. ~8 @" o F5 S9 X& a
@.DrivingHome := true;
- n! \! i+ x8 ~0 a. k: Z" o end;' M' B1 ?1 @6 I3 D% |# k! x& M2 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: f% b4 q; j9 h- J, r7 I* K
part := @.transpOrder;! l2 O, N) `/ h/ h
part.move(@);-- load part
$ ?+ B( X; u) S+ s @.CurrIcon := "load";% n# a' d, A% _6 \3 Z
GlobalDistObj := part.globDestination;
% M- c0 a6 i( F6 H, i; m assignLObj := rgmanager.rgAssignL;
( g% O( \* E7 X, p2 E% D7 P; k row := assignLObj.getRowNo(GlobalDistObj);: h) m, R" `: l, P
if Row = -1 then -- since 70
+ K$ g% o: f9 i2 _& a if lan=1 then4 I8 V( Q$ m8 v) B, v& j) \! y$ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 B1 J: d. ?8 b" i$ w; b$ @$ D. y to_str("in der Andockstation: \"",?.~.name,"\""));6 S( z* ^. ]) |$ Y, w* W
else
( q4 t5 E0 a0 {9 [2 ?; Q+ d; Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q8 i+ b& C) O. [- Y to_str("in docking station: \"",?.~.name,"\""));
! y* u& S( m7 K! z+ V$ m end;
, P! N9 U9 m' Q- F else8 u+ s J4 F9 X2 p, O8 H0 W
@.Destination := assignLObj[1,row];7 _4 c' l* C/ f0 E0 K% P! G
end;
" i+ V* C( Y, a$ y* l- d7 N% y newDirection(@);
( O; L' W+ c- F6 |" ? @.HasOrder := true;
4 A' A% G+ T& V. \% u$ @" B end;
# e8 `. _6 f$ H) ~" h end;
# O. |$ M3 w" D3 d+ P& m$ [& Zend; -- of the method5 G* ~: d* m* j; e2 d. b
|