/* called by: entrance ctrl of the object 'track'* u3 z1 g6 p5 r; A3 C: F$ s' F
*/0 @! e" M2 P H+ T; q
is
$ Z" \6 b4 ?& A5 J7 E3 m, ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- w R# ^' F! w# q# c: pdo& ^( q, o1 j5 k4 J* j/ h( k
Lan := rootfolder.Internal.Tools.AOLlanguage;/ E1 x. k3 C+ x* V, k4 \! c5 n
if current = @.Destination -- else return* t" P1 C- B! y$ h1 ~7 z
then# Q K- F5 ]4 d. y- r3 }
@.Destination := void;3 s7 X, ^* N( `1 n" S# v
if @.occupied then
7 z+ X, d5 m/ J7 w; j6 j! ~- i; l part := @.cont; R- ^- r* X; u2 S
@.transpOrder := void;
- E; K2 @. n w/ g/ f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ?& c& ]8 v2 m) \# H @,root.eventcontroller.simTime);8 ^1 ~& [$ T& f! f
@.HasOrder := false;1 W( s% j$ q: j$ P1 s4 y; n; ]' O
@.DrivingHome := true;! P3 ?, O1 n" J5 c8 @) w4 t
rgManager.tryToStartTransOrder;) [7 ~, y2 u, q) W5 L
if @.Destination = void! ? [1 q* q2 e7 R
then -- no transport order for vehicle @( O0 [" k2 w6 L, K
@.Destination :=
* [, W8 F5 h' u9 Y) l rgManager.nearestFreeStation(@,track.~);: l) l6 D, T4 o6 k% J4 e F
newDirection(@);
: k' n& W: n& C, N) y4 X/ ]' M( V if @.Destination /= void then! _0 ?7 M& [1 r: I7 K. A* E0 {
@.Destination.NumReservation :=# }) }. R/ c' S6 |3 u( _
@.Destination.NumReservation + 1;9 g. m' G7 p( `. m
end;
& P- H- G e5 n @.CurrIcon := "drivingHome";
4 P5 E1 n6 P" |, @1 Y @.DrivingHome := true;
: L$ L0 N# L- K, w7 y& S$ c, @ end;0 I$ p& _1 o# v0 Y9 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* @- G" E* v6 m* \0 C, _6 ` part := @.transpOrder;9 S% j& U+ ], S1 V
part.move(@);-- load part' N8 `! P' i. @+ n: c
@.CurrIcon := "load";1 R- `. c- R" |# E9 l) i
GlobalDistObj := part.globDestination;
! t! `7 T8 v0 D assignLObj := rgmanager.rgAssignL;0 h& L! g* b, `3 w8 T3 l
row := assignLObj.getRowNo(GlobalDistObj);& d* W6 i9 G- K5 G
if Row = -1 then -- since 70/ d. C! j4 h- w3 v
if lan=1 then
2 A5 U- w/ @4 Y# S ] ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, c# b" A$ f4 b7 E2 L to_str("in der Andockstation: \"",?.~.name,"\""));1 F" E' W; ?6 f! y4 w6 y; r6 y
else
, k2 n9 ~6 m- x+ Y- N1 J6 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! y# E+ ]( e2 q% B to_str("in docking station: \"",?.~.name,"\"")); , z& G0 M7 k* y. u
end;4 M1 b6 }; A! i, w* a
else
( |% Q& r0 }( {& U @.Destination := assignLObj[1,row];9 W' k1 h6 ?( R5 s
end;
r# h: R4 w- U& B; @ newDirection(@);; V0 U% P3 F) _7 r5 ~0 G
@.HasOrder := true;
4 e! {' V X' V+ c) A5 L% h end;
# V( f }$ B9 O. i: |& w end;6 D0 F0 v1 @0 ~" }& b
end; -- of the method" l- v6 b/ b, P7 v! |
|