/* called by: entrance ctrl of the object 'track'. l( Z3 b: q* g$ X! i( ~, z0 ]. _5 J
*/0 ?7 J1 j( S/ I! U' {
is
4 n- z. i+ {& q! O part, GlobalDistObj, assignLObj:object;row,Lan:integer;% @- r% l$ U2 T* }7 Z ?
do! Q1 \. i( d' H: `$ F
Lan := rootfolder.Internal.Tools.AOLlanguage;
x2 j8 i, f6 W) Q, Z if current = @.Destination -- else return
, F1 Z( z) E1 a# L9 [4 | then
9 f, v# m6 |9 y @.Destination := void;% b8 r, S" a, Z3 d. m
if @.occupied then- Z( G; Q& R% c
part := @.cont;
9 J) J% y6 k2 @" e/ {6 w' B7 U @.transpOrder := void;
3 f5 E4 B8 V5 v8 m: T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% P) I1 M. e$ Q0 }' N @,root.eventcontroller.simTime);
! m8 j& y/ ~4 `- g: n: D @.HasOrder := false;
0 p+ D& i* n) H: C1 K$ |) Q# p @.DrivingHome := true;
: d. A1 f/ d; _$ n5 W# J% f& B2 m$ D% _ rgManager.tryToStartTransOrder;8 v& D% f# E- G
if @.Destination = void
6 a: R9 u& y+ D, f then -- no transport order for vehicle @, K9 e8 e( u4 M$ P6 ^3 Y, D" s
@.Destination :=
; f$ C" E8 `4 x rgManager.nearestFreeStation(@,track.~);# K7 Y1 V8 p1 k* [1 k: T# o
newDirection(@);
+ a' n9 a6 y( _' n if @.Destination /= void then0 h: ?9 d* r, k
@.Destination.NumReservation :=
8 \7 s6 L" C+ l) g9 p1 v @.Destination.NumReservation + 1;4 F' o/ k1 A: u- U" ^9 E4 Q
end;5 q. m6 P8 q! g( o' x5 J
@.CurrIcon := "drivingHome";) n, ?5 M& {( D: A$ _. w. g" ^
@.DrivingHome := true;
2 g* f7 E7 |# L! _ end;
! C5 B4 u# |' `4 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station: o3 y& H: X- h9 V: ]' E( y+ U
part := @.transpOrder;5 o3 r* A f. h+ X, \" P
part.move(@);-- load part
0 ? j6 G% N3 D4 f4 A @.CurrIcon := "load";6 H. @% O" }% F2 Z$ X; E
GlobalDistObj := part.globDestination;
/ e& E6 b4 |* t% ] assignLObj := rgmanager.rgAssignL;8 L* o3 Q9 K6 y5 g
row := assignLObj.getRowNo(GlobalDistObj);
1 r: p0 [+ V% y$ S+ M if Row = -1 then -- since 70
; V/ l8 ^- p2 j if lan=1 then
' E& { @* w' ^2 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 \/ t8 N# K0 g- |
to_str("in der Andockstation: \"",?.~.name,"\""));
' a4 p; S* J! \& m; a else
" Q7 d' Z% {- A1 x# A" L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ m0 P) H1 O( R# ]$ e6 ^; e to_str("in docking station: \"",?.~.name,"\"")); 2 c, v& Z- k: G' f! e# Z' D4 }
end;5 k' E0 s1 C2 l* q# h! r$ {+ i
else& R* ^% B, R2 [: _
@.Destination := assignLObj[1,row];- q! I. X& `7 i i& l, c
end;
0 l5 u& D! M+ r- P% I4 ~7 T L5 c newDirection(@);* c/ [: X* @# n6 k }0 r! X
@.HasOrder := true;- X. C) N5 [( F4 j J: U
end;8 o2 T U7 s2 Y& p' S
end;% I8 S! y+ [% g; {, p1 ^; a8 Q x; \
end; -- of the method
9 [! W. y" c6 j- b! \1 L |