/* called by: entrance ctrl of the object 'track'5 r+ k! O4 ]7 y! l* v
*/8 q' y! m3 [; A" i, Z+ P @: i
is
" ~" E! J/ x- T9 C, y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) d3 C% Z) E: n3 S6 I7 Q2 w4 [4 W, vdo Z( Y# E" h0 U: t( e, A
Lan := rootfolder.Internal.Tools.AOLlanguage;- j1 N( F4 V) ]& s9 E
if current = @.Destination -- else return
" X6 g# P0 e, H/ O( w: I" C then y+ b# {' w( {# Z
@.Destination := void;1 {, x3 @0 v8 w8 z e! y! H
if @.occupied then
4 S3 t, x' r0 V part := @.cont;
$ q- Y/ h5 W6 O6 C* n. s; `- s @.transpOrder := void;
% y, ]: U5 n! @% j# f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ n$ Y7 c% A8 }1 A* a% Y L, l @,root.eventcontroller.simTime); u' {0 ^1 D5 E% c* F5 |- J
@.HasOrder := false;
4 h4 Z$ K6 x: D: N, [ @.DrivingHome := true;
2 R4 Z) ?9 v% u2 f7 Y rgManager.tryToStartTransOrder;
3 N, [. W6 L/ C$ M) e/ E if @.Destination = void& I |: o/ S( z; a; _
then -- no transport order for vehicle @
$ [* h% e1 {, L& k. E9 g0 V, w @.Destination := ?2 F8 D+ q" P" ?
rgManager.nearestFreeStation(@,track.~);
; z, Q7 ^; w _ newDirection(@);
B: X( E( ~) W$ c$ x) s if @.Destination /= void then7 D" n* Q2 u* k" Z& p- e
@.Destination.NumReservation :=$ H4 q6 ?! o" f9 m6 B7 t
@.Destination.NumReservation + 1;' h8 a( n. l: t' B9 G9 c
end;* ^' _: s8 Q# Q! ^
@.CurrIcon := "drivingHome";
p' o& o& K3 ]; D7 I @.DrivingHome := true;
3 h/ D/ m7 a9 k) z3 {% c6 N+ A end;
: X7 \, l% P: i) x else -- the vehicle @ is empty, both vehicle and part are in the same dock station; n) U4 ?* Z# S' b: k! }* P2 W
part := @.transpOrder;) l* K: p% x( x- t, T4 |
part.move(@);-- load part
5 I+ p( C* v' B& g% L2 J7 @6 t: o @.CurrIcon := "load";, `+ G+ h2 T& u, ?% n, ^0 | q
GlobalDistObj := part.globDestination;
" C1 x% h. L" x% C8 | assignLObj := rgmanager.rgAssignL;, q8 t% R; Z7 f! _& p# ~" V
row := assignLObj.getRowNo(GlobalDistObj);$ Z. e1 K; l9 d- q& v% D
if Row = -1 then -- since 70
1 I6 _4 l+ S- U6 C7 Z if lan=1 then
! p* ]+ n, H7 I' G3 V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 ]0 ~0 A* `( e& v( d$ J. v$ j, C to_str("in der Andockstation: \"",?.~.name,"\""));& E3 P j9 j/ G" Z/ G; T4 B6 |6 K
else
d3 o0 m! h4 l" A, `3 @, [6 N& l4 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# A3 N9 X9 O: r$ ^2 i% X- h2 i
to_str("in docking station: \"",?.~.name,"\"")); 3 O0 n+ C0 b6 u1 v) X. K
end;- l* e8 W3 q: s$ A
else
7 l+ E E$ X. X# a @.Destination := assignLObj[1,row];2 y! E) @# c M, I
end;
2 M$ H' b( d8 I- c newDirection(@);
; a0 U) b& P a/ i @.HasOrder := true;
9 b2 R/ T' L3 ?5 L- W% n5 X& M9 k3 L end;
$ D" t: Q1 w1 t end;4 N* Z6 b# t7 P6 u& S, w4 g& q
end; -- of the method
6 R) q: u: k4 J3 G5 t3 }6 @ |