/* called by: entrance ctrl of the object 'track'2 N! _' q) m h) H
*/% W5 C* i* {0 V; h6 A" i! ]
is% w" c8 g9 l; {& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. O4 I$ _- f% l1 C+ S3 J( `2 S+ f4 y! [8 o
do1 |) ~; m, q5 C' a! H, N
Lan := rootfolder.Internal.Tools.AOLlanguage;% u/ U/ ~1 I- H5 r- p
if current = @.Destination -- else return5 c9 ~% B! D( K# s& Y' W" L6 \
then
q* c1 D5 A }# |9 k! R$ Q @.Destination := void;& B5 f" L9 u# { R8 v
if @.occupied then
4 z# ~9 n& D5 x) c$ x5 ] part := @.cont;! X" F/ ~6 o6 Z; l4 V
@.transpOrder := void;( O& M. X7 K+ i& W0 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ^3 _: u/ u, |8 O" p @,root.eventcontroller.simTime);' I8 Z. g* ^* \
@.HasOrder := false;$ d+ Z3 `3 r, u1 }% \7 s
@.DrivingHome := true;* Y) L9 l, P- X: Y- n* F
rgManager.tryToStartTransOrder;/ f$ k+ j$ v9 r' I+ ` U+ l$ P
if @.Destination = void* r' V* x: V4 Q/ O
then -- no transport order for vehicle @5 ^ X. ~4 |8 G; Y( V! }% \
@.Destination :=
+ w7 q/ ^+ J; j6 v9 ^ rgManager.nearestFreeStation(@,track.~);$ Y% i3 G6 v. y5 x8 p7 o7 E
newDirection(@); # X+ a$ `. F" f" b2 |) u
if @.Destination /= void then
7 t4 @. k1 b t N* {* D @.Destination.NumReservation :=; a* q) q- }0 J7 D0 f* Y L
@.Destination.NumReservation + 1;
6 L2 H7 W( d* l; {& {3 S. e2 V- F end;
/ Y r) l8 I# p# C6 g9 K @.CurrIcon := "drivingHome";4 G' p$ B- v: C3 W6 W; [
@.DrivingHome := true;
3 Y5 N( z1 ~3 Y% _ end;* U1 f9 k. l( ?& c- w6 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 N9 y0 {1 @4 G6 I4 A9 V1 l+ u part := @.transpOrder;
. @' T+ L! D# k9 J+ r6 d$ ?5 G5 z' I part.move(@);-- load part
3 ]$ \; O* o* J2 x7 N2 m @.CurrIcon := "load";: e& K3 f. |/ G
GlobalDistObj := part.globDestination;5 T# A4 u0 w8 E t ~$ m, [
assignLObj := rgmanager.rgAssignL;
0 s7 m9 ~- s+ U3 w5 M row := assignLObj.getRowNo(GlobalDistObj);1 u) Y; E* Q3 X$ L9 [% k
if Row = -1 then -- since 70+ H3 a: [5 n6 X
if lan=1 then
, d* w) C. M& a3 ? ]: y! d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 \* n6 k1 B: d2 Z! \ to_str("in der Andockstation: \"",?.~.name,"\""));
p" I, q$ h& ]& M- r else2 v8 n) J& w5 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ?; D6 @& | `
to_str("in docking station: \"",?.~.name,"\"")); * O% r x" B# B4 d
end;
# n( J- U; n) z9 z5 U else
0 Q/ \; N: K5 H6 C% Z" A @.Destination := assignLObj[1,row];
, Z. ?6 e7 ]7 f) f$ u( a/ e end;
6 u& A: v) J: t2 _/ d# ]. A newDirection(@);, a) F2 q! G% N5 y _; H+ Q
@.HasOrder := true;# j3 f q2 J5 c% N
end;- ?& _ q& A0 f$ h
end;
' Q& ?: j2 S1 S/ p6 k1 x, L7 @" cend; -- of the method
+ _9 `% S5 ^+ b! e |