/* called by: entrance ctrl of the object 'track'
0 `- T/ [" X0 w! l6 m/ U*/
) F. I( t4 X. z6 o" R7 Lis W' O' |0 G2 C4 V' k. U* }" {, d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; ?' n# e# L0 u+ C% q6 }8 ~do
3 E. M3 z6 V2 Y1 B, g* ]& D Lan := rootfolder.Internal.Tools.AOLlanguage;
c8 [8 k. N8 _3 A if current = @.Destination -- else return
! }7 k1 z: X4 R- ? then5 u: g% R V1 J% q3 h
@.Destination := void;. z! A: W+ Z. ~5 s1 p) P7 a
if @.occupied then
$ ]4 q1 Q" V7 Z" `8 q7 P# i4 c4 e part := @.cont;' e2 w9 D# K G: }" r5 X! A
@.transpOrder := void;6 N p# e$ ?- D K2 t$ o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* E3 D7 U0 q; r& V" E
@,root.eventcontroller.simTime);
( [( E* K) q& `; e' O/ B I( g | @.HasOrder := false;* ~) O$ b( W+ U! Z
@.DrivingHome := true;
. l. l- N) z2 x/ {, M# B" K' f rgManager.tryToStartTransOrder;
; ~# {5 f; X% q$ ^6 b; I0 ? if @.Destination = void7 |# V" E5 K. Z* _/ f1 F
then -- no transport order for vehicle @
. l- p8 T+ g+ V7 S6 K- N4 S @.Destination :=
% O( u3 Y+ K! u3 ^8 r" |0 ^( c$ N. H rgManager.nearestFreeStation(@,track.~);+ H; Z3 |5 ^/ D* a
newDirection(@);
% N U) Y2 [8 s+ ]; Y5 n if @.Destination /= void then% m5 j3 g T/ B; S x! w/ n* e
@.Destination.NumReservation :=
' B5 `3 o" n7 \) p( g, } @.Destination.NumReservation + 1;
3 R9 H N5 z9 M& h; C end;1 |1 n* ^# b6 t* j- _0 W8 [1 H) {
@.CurrIcon := "drivingHome";
, k; q, X( `( f8 G; g @.DrivingHome := true;7 a( v" E# ~9 V- U
end;
: Q. v3 u0 f( L7 r( i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 {7 x/ K# U. J' i3 a part := @.transpOrder;7 s; m, i; V& t- ~, y9 c. n/ {
part.move(@);-- load part
! V- `3 M; J: @# F( w4 y @.CurrIcon := "load";2 m: v- B9 r6 \5 w+ b2 X1 N6 X
GlobalDistObj := part.globDestination;5 s* t2 {, O, c* [. e7 Y+ f
assignLObj := rgmanager.rgAssignL;2 p% K t" V8 W4 u
row := assignLObj.getRowNo(GlobalDistObj);. S- a, a) l( d
if Row = -1 then -- since 70" S) U3 m+ p% u$ q6 I% c6 m
if lan=1 then
3 A/ b: Z' k/ B, y: } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 [" i% s- @# `- n7 k& u: m
to_str("in der Andockstation: \"",?.~.name,"\""));
9 T! I/ @6 M Y else o6 |+ ^' C# z6 s' h5 |" t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* E+ q, B/ c4 y# ~# r- L& |
to_str("in docking station: \"",?.~.name,"\""));
?& l% J4 c2 H5 O! E; F n9 ~ end;
# w* a/ Y: f8 L5 p else: S1 D5 q: G" J* t
@.Destination := assignLObj[1,row];
( e' s1 |3 K) P; {6 o; d' N' | end; 0 H: Q5 y( ]4 C2 y
newDirection(@);" A/ a. E; g ~! ^4 }4 b; o
@.HasOrder := true;
1 [, H* \# o2 @! F& A6 c- u end;5 u6 z3 s- p( y$ _+ n, n
end;
$ W; |" ? }! send; -- of the method
: u$ N" A/ c2 i! x& t7 ? |