/* called by: entrance ctrl of the object 'track'( ^% t4 b \ W4 V
*/. r4 `: F9 y& C3 `3 E+ r
is
) m! ^% Y0 t/ R7 x, u( h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, M' E# ]# g/ S2 D/ q( tdo
; \- n$ t9 O2 f; h Lan := rootfolder.Internal.Tools.AOLlanguage;
0 J1 j* H8 I& m |# u if current = @.Destination -- else return4 p5 ^. m6 v3 K" D& d X* {" G; g8 A
then/ o5 s( [( R4 ]* c6 ~& [
@.Destination := void;
, w9 Y; k+ e9 \) f if @.occupied then7 H) H1 J6 }: L
part := @.cont;
" V4 \1 D. P/ J/ s) q7 f! u @.transpOrder := void;$ ^( x2 y) \( b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 F3 E2 u$ J7 L2 ^; C: K @,root.eventcontroller.simTime);
* ]) m2 J( W f/ q$ r% W; H; }/ i @.HasOrder := false;& g+ \- T- _/ y
@.DrivingHome := true;' w$ C8 q; \0 y# e) X
rgManager.tryToStartTransOrder;
B# I8 d5 K% J) l! q if @.Destination = void u( p# x, u1 }5 C' M, o1 ^: r0 u
then -- no transport order for vehicle @
" J3 I3 S3 w) D# t/ D" V$ G @.Destination :=
2 K/ l$ u/ n( V+ Y# ~' v# { rgManager.nearestFreeStation(@,track.~);
5 f: H1 k! x u0 T( U5 Q newDirection(@); : {6 J, l( J( W& A
if @.Destination /= void then
) A8 D w6 G. b3 J @.Destination.NumReservation :=3 h0 ?' d l# N; ~( z
@.Destination.NumReservation + 1;
% G1 y9 W: J' [) u0 ]; B end;
0 W, ^3 {% X9 \+ i- w( o @.CurrIcon := "drivingHome";
' z+ o& T1 R2 Y+ K2 f& U @.DrivingHome := true;
$ ?3 C/ ]( Z3 a C end;
* a* y) z0 X0 ?, t6 o( ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station* Q- y( u4 [+ ~) j. T$ m
part := @.transpOrder;: a3 D2 h' M! _* o" {9 B! E" _
part.move(@);-- load part- q2 e1 q9 `7 u# C8 u) b
@.CurrIcon := "load";' |# @# w# j0 p( a m
GlobalDistObj := part.globDestination;
0 J8 z0 S* w: f. e$ G+ |8 Y assignLObj := rgmanager.rgAssignL;/ b& j. Z& Y0 m: f; H" e
row := assignLObj.getRowNo(GlobalDistObj);$ p6 V# |* d- a
if Row = -1 then -- since 70. b7 m$ m, q5 \8 E
if lan=1 then& V+ ?6 O7 A. N7 i- S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ ?4 B: Z; p/ i8 o, a0 \6 w/ |( c to_str("in der Andockstation: \"",?.~.name,"\""));
. g e& C) G' d, ~6 ` else( a( k4 i/ z8 Z: ^$ T/ F$ U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; g) B' r; E" t to_str("in docking station: \"",?.~.name,"\""));
8 m2 {1 m! [% r% F0 w9 B end;
* X2 }7 M+ G4 J2 c+ ? else
3 s5 `- D& x' _3 E a @.Destination := assignLObj[1,row];
& q6 `' [$ ~" ^) j( h. @4 d$ q end;
. c3 s7 R8 {9 S8 c+ R* i newDirection(@);
0 S# @) S' {5 ^3 O& A0 I4 T( K9 P @.HasOrder := true;
# q2 \. C7 d. Q5 T8 Z( k end;
6 L1 R6 V% x' b0 g" B end;
( K/ j. T. W" c: H' j5 ?: Kend; -- of the method9 g# ^8 U+ _; g$ ]
|