/* called by: entrance ctrl of the object 'track'% P+ _" J+ \% C r# s- J! q
*/) j2 t$ e3 i' ]8 O- V/ r
is4 x k2 M6 s4 ?1 O4 V1 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* L* t" h- G2 M% q7 S
do
) H% v* k! P- b8 K Lan := rootfolder.Internal.Tools.AOLlanguage;
) K1 u5 J8 I% V' V) x; E( @. m if current = @.Destination -- else return, x: K/ \5 f$ _
then
; f$ x1 y9 W: A- d5 a& o @.Destination := void;
, U& F- N* g1 {- w1 b if @.occupied then5 m9 I4 a% j5 t* S+ }5 ~
part := @.cont;, B i, W; f) G. |9 G
@.transpOrder := void;2 ^/ x/ V* ^( ?6 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 e3 q; F5 P& N2 A; V& f9 c
@,root.eventcontroller.simTime);
! W3 L. \5 m! u( Y6 d4 ^9 ?1 Z1 y @.HasOrder := false;" V6 g* t$ h- c: ]0 G, k1 e
@.DrivingHome := true;
( t$ `% S" Q( J w( C1 X! T0 B% A. P rgManager.tryToStartTransOrder;
/ b6 |$ R' @' [# c- K if @.Destination = void
8 \2 R1 E7 q1 j- o4 ^" i& r then -- no transport order for vehicle @# R0 i. R: t* P& }7 H
@.Destination :=
7 n, X6 y2 @9 g! j' r) i rgManager.nearestFreeStation(@,track.~);
J- x P8 \( Q) v! U. u newDirection(@); , g1 b1 `: c5 {( U+ |7 z+ ^
if @.Destination /= void then
. ^- S2 ~; Q% o3 j0 U! b; n @.Destination.NumReservation :=
( p& a: |& N7 ]4 N% W @.Destination.NumReservation + 1;
/ {1 N4 ?! b0 Z' T7 z$ Q: u s5 Q end;
' }; _; I% A3 v% g- R$ x @.CurrIcon := "drivingHome";
, z; l+ m# P- _ @.DrivingHome := true;$ G1 M/ c) r' p1 q
end;
, i; N- b7 b$ L: h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" q" ~. w) e) n: x part := @.transpOrder;/ d& P. I% s6 b& P. X
part.move(@);-- load part
* g& I9 z* {7 J, A5 _ @.CurrIcon := "load";
% U& v& t) V( V {# b5 K) d GlobalDistObj := part.globDestination;
; P3 [- m5 i" i1 D7 O assignLObj := rgmanager.rgAssignL;2 {; `! |' x% E, ]: C* N
row := assignLObj.getRowNo(GlobalDistObj);
* j5 s& f! i! t5 n, z" S if Row = -1 then -- since 70
6 S; P% \9 y5 j! m( Z if lan=1 then5 H q- G2 |; }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% x" N% q* r j+ n; Q0 F/ X* X
to_str("in der Andockstation: \"",?.~.name,"\""));
/ Z1 A9 _) K$ [$ L2 H5 X- f8 g else
: z! Q5 Y! i. f3 o7 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* r) o. w& @0 f2 y' s" O% F5 j
to_str("in docking station: \"",?.~.name,"\""));
7 a* C6 h: l8 b, L6 W: y1 _ end;
4 b' T( R% f* ~) X9 F2 R) Y else! B, d V# H0 ~: ?$ M
@.Destination := assignLObj[1,row];2 o8 v/ ^* H+ h+ L+ g' [; V% J1 s
end; ) S' G8 {& t( t
newDirection(@);
& v* b( J7 O- `1 z% p @.HasOrder := true;
! W1 l9 C2 A1 C+ z end;/ F5 L- r5 F% ]" e& A4 z8 k9 S! |; P
end;+ Z4 m; T2 v! {3 u1 f. G
end; -- of the method
; b1 n* `* m. m o$ o' D |