/* called by: entrance ctrl of the object 'track'
9 i$ M; c& U' p" O8 I6 r, N( u' r9 B*/
- s# R$ [" M& G- e; j7 Sis' q# z3 C k' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# x; O6 {6 G! N4 ]) y5 [8 [" q3 zdo
& Q7 I6 G" G z Lan := rootfolder.Internal.Tools.AOLlanguage;
* g& n& X- h3 r if current = @.Destination -- else return
* f. u+ j4 |5 |+ {' S! T Q2 Y then# A0 e/ U2 p8 b8 R8 W; U
@.Destination := void;0 @$ ^' o2 H9 s/ T
if @.occupied then6 K; L5 [. v6 r6 R# e# [
part := @.cont;
# l+ I$ c# R- q4 E6 b @.transpOrder := void;
- A: B" _) I; t/ M3 q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ D/ F; Y/ }4 g$ w0 r; ^! G @,root.eventcontroller.simTime);& R. Y( G; F1 h6 P! [; n
@.HasOrder := false;
2 \3 ]' j0 B/ P& l& o" Q6 c @.DrivingHome := true;
0 ^! s! v' ~; B% L: C) t. l rgManager.tryToStartTransOrder;
4 o. i9 h2 R1 p if @.Destination = void; G* ?. K! [! i( E* }) u; K3 N( w
then -- no transport order for vehicle @
9 [0 I, ^6 w6 S @.Destination :=
2 o6 Y1 G, f5 n& Q( J, S rgManager.nearestFreeStation(@,track.~);) V' C* M6 _# U+ ^5 z# Q( R
newDirection(@);
1 L4 ?' r/ h4 T0 I/ b% l- [* K% m8 { if @.Destination /= void then
+ [$ a) t7 z" t, o+ e( R4 g3 V Y @.Destination.NumReservation :=
5 d3 b3 g7 x w7 K5 i) U6 d @.Destination.NumReservation + 1;
3 P( {$ }; t/ G" l end;
4 q' A6 ]9 @/ f. n# d @.CurrIcon := "drivingHome";
+ I2 W" x; X2 ]# w$ U @.DrivingHome := true;* d% M* u/ l1 V3 g$ z# G/ `
end;! [/ Q) c7 `' z& m! C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" G4 I+ e3 I% v* C
part := @.transpOrder;
* S4 Y1 F( l1 }7 y part.move(@);-- load part
% R$ X: |0 A/ S9 b1 C& Y6 L! u1 @1 q @.CurrIcon := "load";( Y1 h4 \) g# I4 `$ _4 a
GlobalDistObj := part.globDestination;' T( o+ N! J+ t* _! M! K- @( H3 G }
assignLObj := rgmanager.rgAssignL;9 i: H4 K( N9 m1 Y8 A5 F6 n
row := assignLObj.getRowNo(GlobalDistObj);/ D7 `+ l& `9 P; T2 ]; Q
if Row = -1 then -- since 70
7 x$ |5 X( f# Q, V if lan=1 then5 q2 X# B3 b9 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( m$ _5 a" Y4 Q' ]7 y+ c( a, [4 G' ]
to_str("in der Andockstation: \"",?.~.name,"\""));
6 L, m& C, ?+ t V$ g9 x5 Y2 K else
$ X v' x M* b- E$ d/ t: v7 [, @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& i4 Z% J: T. j4 \% c0 A; ^- n
to_str("in docking station: \"",?.~.name,"\""));
3 W1 V8 s- T$ ^1 Z end;
& ~9 J' X, W$ t- M7 K else; B+ Y& p# b; W8 F$ |- C
@.Destination := assignLObj[1,row];. n* H" O! k# c; |( h3 M/ X
end;
- D/ I% \, m/ E- l- {- j8 Q newDirection(@); `$ M5 t! e0 F4 g, a: @4 d
@.HasOrder := true;$ V/ k. l0 p. s6 }6 V a# P
end;
7 s4 t# u7 y; ~) z3 r end;+ W; y# \- H9 a+ c( ?
end; -- of the method5 z5 a0 r& U( B5 \& C
|