/* called by: entrance ctrl of the object 'track'
% @2 w8 Q- P. n( _2 e9 [*/
: V+ v3 F" l; @! H) Yis
% Q9 U O" d! d; r- c4 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 H8 u& v! U. x+ D
do, X4 h' g1 c* J5 q v
Lan := rootfolder.Internal.Tools.AOLlanguage;0 e& v6 I! \" X; Y2 w& k
if current = @.Destination -- else return# O. y* C& T7 o
then
; U$ \: o8 y1 I1 o( c! ~ @.Destination := void;
" r$ {8 u* b/ X! {! Y" W if @.occupied then1 e/ H6 i1 s* T7 D
part := @.cont;; `# h' X* s! H7 p
@.transpOrder := void;
( R" A4 A' E, W) R5 r2 C9 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- D! c8 O$ M9 W! C' } @,root.eventcontroller.simTime);3 K4 a) _0 {: @" q% q' F
@.HasOrder := false;
' w, C+ `7 y- J% K @.DrivingHome := true;
" }/ {/ g+ C. q0 Y rgManager.tryToStartTransOrder;
9 @6 z! }, M# C! U; T if @.Destination = void/ F) r+ H$ k4 w* g, @
then -- no transport order for vehicle @1 E5 ]- t$ k7 ^7 B) W! P
@.Destination :=
7 Q7 V8 D3 V: y! C3 y( r rgManager.nearestFreeStation(@,track.~);
" z" ?, X0 b, r: ~/ _! [1 a newDirection(@); 6 O. }! Q: m1 A" [& n7 [4 u* C
if @.Destination /= void then3 u$ _. W% I( _: i6 w
@.Destination.NumReservation :=1 |. Q2 ^7 L+ B3 S8 K2 e2 o, S" w
@.Destination.NumReservation + 1;+ } F- D2 m5 E" z, W" m
end;
+ u' g3 Z& P$ e5 r5 ]0 M @.CurrIcon := "drivingHome";; G" {6 L3 z% g0 M3 K- P( [1 Y
@.DrivingHome := true;
% I: H; f) R+ y end;( e3 m2 u/ p% O& \5 u% R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 E M% f5 S& _ h
part := @.transpOrder;9 O3 \5 I& C9 o/ h( w- p4 r1 a% A8 i
part.move(@);-- load part) w8 Z( d. M: M' ?5 J
@.CurrIcon := "load";
6 ~/ X3 M: L1 ]6 ? GlobalDistObj := part.globDestination;, s) g" F; w! D' w& S+ ?5 r
assignLObj := rgmanager.rgAssignL;; ?! b! z- V8 ~; k7 T' K5 E$ K
row := assignLObj.getRowNo(GlobalDistObj);- J! m, |. O2 W8 ~1 ^
if Row = -1 then -- since 70" v" g; C# T- a! f7 }" ~+ N
if lan=1 then
. A/ s( e( W+ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& j$ |2 `4 R: M* Z5 m5 R
to_str("in der Andockstation: \"",?.~.name,"\""));
$ x$ C& |* c3 n [" D9 y9 h else+ a6 o8 Q2 M( l6 x4 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
y- P8 x, D% z9 z& h4 w to_str("in docking station: \"",?.~.name,"\"")); 5 p$ [- q; L+ k% _% v$ w1 h. J
end;
1 `( a3 c j) G- ^0 A else
( ^9 C( u8 B' \& |5 f9 T @.Destination := assignLObj[1,row];: ]8 Q' h9 b9 _. f7 s
end;
, |4 t/ g* x8 s newDirection(@);- y$ D; m' {$ H9 r$ X3 Z
@.HasOrder := true;
5 h: X/ |, ?4 Y) v0 B7 m a2 M end; X( Z. _7 e; n, k! A3 J
end;
5 x: N* H9 s: f. g; u& r5 Bend; -- of the method( j- v' ~2 _- a
|