/* called by: entrance ctrl of the object 'track'
. M% H5 x: B" e0 y) g. j*/
1 H# D: A6 }& s: A2 xis
8 ?5 |( F+ n' b( k# n. X. ^- I! I part, GlobalDistObj, assignLObj:object;row,Lan:integer;' H( J* E" K+ s I) v
do
, e1 c/ c, \9 q2 f6 w" O Lan := rootfolder.Internal.Tools.AOLlanguage;! Z3 F7 R' Q" {) o1 T2 @* G
if current = @.Destination -- else return: j2 g2 ~; Z1 D+ L+ v
then
2 `! p$ a0 j0 a @.Destination := void;
9 J9 q" T& {& M2 k if @.occupied then4 b& `1 c& Q) `! Q# m3 z
part := @.cont;! {) N4 k% {* O! Y2 `) h& f
@.transpOrder := void;9 a6 A' m8 b- l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 a: n0 k# n$ d
@,root.eventcontroller.simTime);
/ l' l+ h+ W" F, _, a @.HasOrder := false;- C6 f# T* Q# G5 w( S# S0 C" P5 z% `, X
@.DrivingHome := true;
X c' \" p$ `* I" I8 E0 J+ ^ rgManager.tryToStartTransOrder;
' T( F: C# o% s if @.Destination = void
; v4 C" K! Y& g: I# {% D# j& x then -- no transport order for vehicle @& j# X( R- o0 T- @1 U
@.Destination :=5 D6 V- I, V) u3 _' \6 j
rgManager.nearestFreeStation(@,track.~);- d, D# f3 Y# Z7 A, M
newDirection(@); * n) e; W9 q% x7 _& _4 {
if @.Destination /= void then
, ?" s' b- o0 r' g @.Destination.NumReservation :=1 n7 w* p" M* [- u3 r
@.Destination.NumReservation + 1;* y' H3 X8 g& g' }% k* r
end;/ G% ~- e$ o! r7 i: n, q
@.CurrIcon := "drivingHome";% F8 D" } t3 ~9 Y* C7 b
@.DrivingHome := true; i' D6 o& |5 u+ `, Y
end;: J0 x- F$ i# J; H/ }6 W X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( [1 C- C: I! A5 O* F0 w! k
part := @.transpOrder;5 _5 g% O A" `
part.move(@);-- load part
% M4 [. X; g% z; O @.CurrIcon := "load";) M G- {5 V7 z& ~# s! I/ [
GlobalDistObj := part.globDestination;7 Z4 }9 P, }( |3 a8 s( L/ m, y: N
assignLObj := rgmanager.rgAssignL;
( s6 D$ X1 i/ I% ]9 }/ S: Z row := assignLObj.getRowNo(GlobalDistObj);
, e2 P6 ?. [1 w6 T: R7 G [ if Row = -1 then -- since 70
. b9 S* ^/ o0 A4 }, f7 g2 @, r if lan=1 then
* J% l9 Q! B. h+ o9 Y- t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ q$ D4 r# A( n+ H
to_str("in der Andockstation: \"",?.~.name,"\""));& a+ O+ [' b7 `" n$ I
else6 b5 y* Q! k( D9 `. W; T, J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," k' o9 ~2 q0 d' g% n, V; [
to_str("in docking station: \"",?.~.name,"\""));
6 q( c. o: p7 d" h& c q2 ` S& \ end;( D# i, G0 g/ L9 _
else& b4 h; U0 k' ~: C+ H+ ]' t
@.Destination := assignLObj[1,row];* n' q! U6 G0 z
end;
9 P4 U6 L$ B ]8 w L& g newDirection(@);
# K; e/ c% ~ K @.HasOrder := true;
, A6 o- Z$ }9 L- x6 L& f: E end;
1 U1 W% \2 V* V- M/ N) w end;" O( ~: I7 s; B( S9 f4 y1 J
end; -- of the method
$ G1 x6 w) \1 S) i |