/* called by: entrance ctrl of the object 'track'
: G+ Q( J; C$ l*/& q4 p; T& L. I$ L4 a: x: p9 f
is
1 u. n3 B a' X4 \$ l- b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 p; o# P9 Z7 z5 e+ B5 p3 ydo
! s9 S) ^$ e1 n Lan := rootfolder.Internal.Tools.AOLlanguage; }! r% E* P( ?% f1 `
if current = @.Destination -- else return K% C6 ^0 R+ q7 i. a$ Z0 u
then4 @! `. b1 }/ e
@.Destination := void;
0 O8 F! V+ K5 @& ?4 Q/ ?/ @& d# u if @.occupied then& [' j8 [; C0 n) o3 a
part := @.cont;
$ W+ a' G) o- h+ T' y8 a; o; H; V7 J @.transpOrder := void;
9 T3 a$ P) {2 j [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) l4 y3 j- ?% y4 M1 h1 G. Y @,root.eventcontroller.simTime);
( K: p! k; O5 T7 }3 l @.HasOrder := false;
# e( E0 V; z( u2 h4 R& s' U @.DrivingHome := true;
! p! F! B3 o% X$ G0 X rgManager.tryToStartTransOrder;
4 }% I5 F/ ]3 ` n4 f, F if @.Destination = void
$ k D2 F; W' r+ a" } then -- no transport order for vehicle @4 f: I& u7 M- P* f( `. X) f
@.Destination :=
% Y( J, O7 t: z, o2 A3 E rgManager.nearestFreeStation(@,track.~);8 Y, p# [/ I$ N0 s* ]$ e" T
newDirection(@); % H& P( W/ M9 B- E \" P& T
if @.Destination /= void then; ]3 v4 G/ p4 S
@.Destination.NumReservation :=9 ~8 B) i5 Z3 y& M f
@.Destination.NumReservation + 1;) J4 y4 h' ?% f$ P* s3 Y' @; y
end;4 \$ K% @/ o" i& e5 u
@.CurrIcon := "drivingHome";
& y' V6 o( ^' j' M0 h) @8 Y) L @.DrivingHome := true;* j7 K, K2 H- X5 V& q
end;
3 Y: A$ U. P7 J u& e% a/ @1 ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 j. h) x7 _' [5 X1 v" |' S' M part := @.transpOrder;
' |. G8 A8 u" C6 _( c1 e4 o3 B part.move(@);-- load part
: o& M/ [/ t E* a% P @.CurrIcon := "load";+ A0 I/ d4 s! i2 O. h( {
GlobalDistObj := part.globDestination;
" R9 G' _/ Q$ N/ n( F& X, D. K3 d$ F assignLObj := rgmanager.rgAssignL;
' ^3 n0 G$ ~& W6 R0 [ row := assignLObj.getRowNo(GlobalDistObj);* C1 y! J. v8 ]
if Row = -1 then -- since 70
8 @0 Q6 O7 z* e- ~6 R, U1 ^ if lan=1 then; `4 j6 m j" ^5 Y$ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! l- H$ }3 Y( O1 I4 l* C* s, \# I$ w2 |
to_str("in der Andockstation: \"",?.~.name,"\""));
2 r" x; ]4 Z* L3 F else+ p, P: p J8 w/ O6 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& t$ O7 B8 y: W$ u3 j6 T; l to_str("in docking station: \"",?.~.name,"\""));
/ v5 U9 X) E9 g6 \: b U" T end;2 [4 a- T1 b0 \# Y
else0 e% F) W. w5 n: s, f, T
@.Destination := assignLObj[1,row];4 K$ k$ Y; A- i7 V6 s( \5 Z
end;
. h: K4 S) q( }1 K7 L newDirection(@);
2 } Z* ]2 S1 Z! o3 v* ?3 R. q* F+ x: i @.HasOrder := true;
4 n& g8 \2 o A f' u0 g% f7 U end;8 n; f4 `8 O. n9 M1 {; @. \. d* M* x
end;
, @( N5 S; |! c, L6 K) K5 Uend; -- of the method
t) s5 A3 E, E- D |