/* called by: entrance ctrl of the object 'track'9 X; k& w$ B' G6 {9 G
*/
" {- f! V2 h6 M. g+ Q. Mis
- m9 z, L3 Q* n3 r/ J& ~% E: y4 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( t& k3 S a4 `6 `, vdo
4 t0 n* N6 G; @: q/ V Lan := rootfolder.Internal.Tools.AOLlanguage;
u' o+ H+ ^( ?/ Y) Y7 T( ^ if current = @.Destination -- else return
! w0 _( y8 `" a! ~: a7 {3 Q' q then
* b6 G- u- u: H. w1 L @.Destination := void;
' W1 }. {/ H) v: O if @.occupied then+ @$ x5 O3 m5 ^2 F( u' X
part := @.cont;. I7 `3 p6 M- H# x
@.transpOrder := void;
) [/ T8 \2 S. _9 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; n3 k! q/ I/ W# D' ?$ V @,root.eventcontroller.simTime);! @, {* J6 _ l
@.HasOrder := false;* T* W8 L8 Q1 v
@.DrivingHome := true;1 e3 q" t' ]# p0 p
rgManager.tryToStartTransOrder;
& ~# L. j; O0 ~( g$ D- T% o if @.Destination = void% t7 s, C# U/ j N4 H
then -- no transport order for vehicle @
8 O0 L% C# F( ]" C @.Destination :=
$ |! Y+ @% i4 z% Z ^2 V rgManager.nearestFreeStation(@,track.~);
; g( h0 `1 l; y* e( u! D9 I0 M newDirection(@); 5 B5 P1 m* `! }9 ^% E
if @.Destination /= void then
$ t( A. K. R8 R' q" D; J" S @.Destination.NumReservation :=2 H7 P/ A! a3 c: E4 q
@.Destination.NumReservation + 1;
7 C; g1 k$ Z1 S9 Q4 w end;% `* M/ u8 R( L: M5 F2 v
@.CurrIcon := "drivingHome";
4 r: L: z- f$ ^, ~6 {3 q4 } @.DrivingHome := true;
+ u3 s8 E4 x% h& Y) g* K end;
2 t; q! y4 t9 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 V3 Z3 G' L1 T) F
part := @.transpOrder;9 ]6 z6 T( Y( o t) B8 G' _1 _
part.move(@);-- load part/ _3 _* |, n! D% V8 ~+ n
@.CurrIcon := "load";
+ A8 L& T- H1 |- R2 x+ ^8 Q GlobalDistObj := part.globDestination;+ T7 R9 T- l5 I, H/ R% S
assignLObj := rgmanager.rgAssignL;
; |2 W6 ^6 q0 | row := assignLObj.getRowNo(GlobalDistObj);; ^: ~: p5 n6 z9 O) F
if Row = -1 then -- since 70
7 T' w D, F. c9 C4 j if lan=1 then( [5 E3 k8 K4 T7 M+ b% Q* _2 i A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* Q5 m+ N7 @& d5 `4 s0 Y) I
to_str("in der Andockstation: \"",?.~.name,"\""));
0 K( `% Z. D4 F3 D else) T+ q3 i" ?8 e4 W) q4 P; ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) R9 {( f# `4 v1 X0 y! l
to_str("in docking station: \"",?.~.name,"\""));
) x7 `% G# P$ o1 W- H; @6 _, ~ end;6 u7 \- \# j- C! S& `8 ?, ^4 h
else
; _; h1 ~: T' ]( r7 y+ P @.Destination := assignLObj[1,row];
/ V P6 W6 A* W* v% E* {0 V* A end; " ]: b' |3 i% j
newDirection(@);
' h+ _' l. `5 ]- N" C6 e c @.HasOrder := true;1 d( Y- K+ s M
end;
" s$ z' F% c! x% V3 `( Y" } end;
$ X: I# [. V. O) lend; -- of the method$ `, g: w: o: D
|