/* called by: entrance ctrl of the object 'track'
/ V0 u% z. Y, ^( Q. x' D*/
$ E- u1 t, l1 k( ]7 cis. w, d7 _8 I, T. r7 _( D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: k' l: Q% |; o* E! U. H2 P6 j8 cdo
. y7 _5 d- w1 B, V3 J2 T9 S0 @3 Y, ? Lan := rootfolder.Internal.Tools.AOLlanguage;
2 G8 x) y1 ~1 M/ H) o4 n1 q if current = @.Destination -- else return
" O) i* u2 X- ]1 ^$ o) a/ ^ then
5 r3 |7 S. s& m: l3 f @.Destination := void; d. z* {2 ]) k6 l
if @.occupied then
3 f( i9 ]7 U; e- }( v+ v0 ^ part := @.cont;
) E- ^) T' R0 t( f9 n( D @.transpOrder := void;2 |6 G: l, k* n9 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# K/ ~8 R# k, m3 Y
@,root.eventcontroller.simTime);
1 w! f( c, Y1 g# b @.HasOrder := false;7 j5 a7 Z5 t. D: [; a. [3 r
@.DrivingHome := true;2 U" d) ?7 K% \1 U$ h1 x: b2 X
rgManager.tryToStartTransOrder;
1 z" h. ]1 n6 y: s5 I" J if @.Destination = void
/ \7 V' L* Y, p then -- no transport order for vehicle @' p S/ I2 k5 w7 E: ?
@.Destination :=
; L; J% `0 `# ^5 } rgManager.nearestFreeStation(@,track.~);0 J2 D- e1 I0 V
newDirection(@); 6 C; g6 \# O1 ~) F: C
if @.Destination /= void then
# D" G+ D# _/ s) s @.Destination.NumReservation :=
! O- c- \6 f! y+ a% W2 o @.Destination.NumReservation + 1;
4 A' Y1 i1 _8 h1 y, J5 {; {/ t end;
9 y9 s' ^* a l6 G4 q @.CurrIcon := "drivingHome";2 u! o+ f! g# h8 B9 b4 w
@.DrivingHome := true;( s- ^6 K4 _# _: L+ ]: R/ W
end;
, y8 t$ ]/ k/ Y) p( B& E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& M* b! h+ m6 w' ~+ d part := @.transpOrder;
7 j. u0 c2 s" v* T part.move(@);-- load part% M: j$ D- ^0 H- `
@.CurrIcon := "load";
3 a' h$ n4 |3 w: C# D! A" w GlobalDistObj := part.globDestination;) L9 e+ b: i2 v9 T h( o- B! [
assignLObj := rgmanager.rgAssignL;
, W# K3 w4 m& U, a, i1 n row := assignLObj.getRowNo(GlobalDistObj);% |" O+ P5 k* ^
if Row = -1 then -- since 70- }7 I' e4 k0 H9 w J* Q0 H
if lan=1 then+ b4 M- V" h9 m% G* h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 V4 a6 W9 z" e( f3 R# x to_str("in der Andockstation: \"",?.~.name,"\""));
$ e4 l+ Y& L) A6 C2 V else
. Z) f% w$ D8 }2 @; K! B- X" [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# c1 {2 I; S6 f: r to_str("in docking station: \"",?.~.name,"\""));
5 w) h2 ]0 F( a) c, L; a+ ]7 k end;, g+ E4 M$ Z3 V! d( d) U: o% N
else
' O7 M0 \+ e1 \+ F @.Destination := assignLObj[1,row];7 n1 c& l4 E4 {& n
end; 8 V/ b3 K0 ~* e. o( D+ A, B
newDirection(@);
3 C6 F- [; |3 Z @.HasOrder := true;' B( I8 m( q# O7 _: ]
end;+ C& [, W; c% ~/ p8 T
end;
6 C1 B/ r$ F6 gend; -- of the method$ D* {. x! [; d3 C7 K W8 ^- E4 _" e$ ]
|