/* called by: entrance ctrl of the object 'track'
2 P8 s ^) y* g% K* E; a*/$ M, X- _ b9 {2 n4 b) P
is" n! i. b% ?9 Q" x* v; }: h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 k9 s7 a& O: O$ L$ |5 x; O7 p2 Fdo
( p; o, ~- Q2 H Lan := rootfolder.Internal.Tools.AOLlanguage;
/ D) r) I# M0 ]3 q% ~( P* h if current = @.Destination -- else return" u i) B% o3 e1 i9 |
then) {8 U5 G% l* i$ m3 e* P6 E h- M; g
@.Destination := void;& g9 W3 l& K' e! }0 Z
if @.occupied then0 S; W6 A7 N z/ y6 H- T. s$ I* W
part := @.cont;
3 B9 |6 e8 N9 F/ Z4 n0 b& \8 u @.transpOrder := void;
& W" G7 w/ L& \) [7 G* S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ p, Y9 a9 X* z1 |9 {5 N
@,root.eventcontroller.simTime);
' b( A/ G' `, \8 M @.HasOrder := false;& V( n" q1 f! { n
@.DrivingHome := true;% i o% }! s5 c: g5 Y( b& T6 A3 _
rgManager.tryToStartTransOrder;
) t5 z5 O' k/ V! l# t U( c+ D if @.Destination = void
6 I+ p6 s0 P* Z then -- no transport order for vehicle @1 |/ {% K0 ~& L+ k+ a# v
@.Destination :=
2 a) C/ D6 d. D( A rgManager.nearestFreeStation(@,track.~);
- q: j: q8 \) A( n newDirection(@); ! w! H( S& F6 E2 }
if @.Destination /= void then1 J. p; Y. T! ~& a7 g) y
@.Destination.NumReservation :=2 m1 ?5 s' I5 p4 Y+ r' ?" j
@.Destination.NumReservation + 1;
/ b, ~7 o) _: t: c1 S' Z end;8 W3 N% M5 h3 b( f; l& g( S# n
@.CurrIcon := "drivingHome";
1 u* [% c$ L' U+ ?/ |* K/ y @.DrivingHome := true;9 Z# |7 a# q/ x+ n
end;1 a3 y2 Y2 E. Y& w: w" h8 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ \+ m1 R; b4 w- `' t0 h" Z, \# ?+ E
part := @.transpOrder;' f5 q7 C: H% C# w9 r2 ]
part.move(@);-- load part3 G) q& L% n& v7 u o7 N
@.CurrIcon := "load";
5 J! a# r, u1 Y1 Z7 F. u q5 q+ R GlobalDistObj := part.globDestination;
; F+ f& f ~" X7 b; X assignLObj := rgmanager.rgAssignL;: U% Y$ U7 F! c/ N/ j- m* n
row := assignLObj.getRowNo(GlobalDistObj);
o Z/ |+ P; V9 S3 b+ ? if Row = -1 then -- since 70/ c( |1 F0 R2 L5 G* t
if lan=1 then
; @4 z4 b: i) B# u& n5 E* h. f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ o$ t1 q. ^* W# M# \8 W8 C' f
to_str("in der Andockstation: \"",?.~.name,"\""));- k* ?% D8 f- Z0 m% @
else& U. L% b! l; F; Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," O7 u3 G1 O# J m3 |) x; \9 Q% H
to_str("in docking station: \"",?.~.name,"\"")); . R; O% l$ Q: D9 L6 K5 `. \
end;
! x% A5 }7 g% x/ \ else6 H; T2 W9 a3 D- ^* B
@.Destination := assignLObj[1,row];
$ x' Y' a) h: n9 X( d& o end; / C# V( m3 j; r8 S2 K3 ?- r1 e
newDirection(@);
% ~* k; U& [: I% [ ~ @.HasOrder := true;
, q3 A5 |$ G) P end;7 m+ @/ F t" V3 h0 E! j
end;
& \1 b4 J# I& x+ c3 mend; -- of the method
2 j* r0 Y0 \9 o" v) { |