/* called by: entrance ctrl of the object 'track'
) X: q' f8 N! y, Z4 R9 P9 C*// R4 c& \# a, ~1 N
is
- c& y- z. \, ^, ~$ Q7 X$ `, i3 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* w2 x: j, g9 a' Fdo& I' Z, ?1 p) @2 _8 s- U
Lan := rootfolder.Internal.Tools.AOLlanguage;& I0 }# J" _& `: o4 R! ?+ g
if current = @.Destination -- else return
1 C9 z- ?; V8 d; H7 f then) t6 |: v* D: c u
@.Destination := void; i) v3 V% L( j0 C# t; C
if @.occupied then4 M( d. |/ J" v8 B* C
part := @.cont;( h7 M/ U( |6 G. R$ ?; u! n
@.transpOrder := void;2 ]$ s. |. t4 z# z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ f$ i& S6 ^5 ]& L2 s
@,root.eventcontroller.simTime);
5 c" ]" M5 ?; \6 r9 e+ v8 Y. \# E- J @.HasOrder := false;" m/ s+ ~1 h% |: P* q4 L- ]: o# H
@.DrivingHome := true;
; e" {/ j T' C. M: I1 @& }& Y rgManager.tryToStartTransOrder;/ p: I5 f S- u. P$ R/ _2 d2 X* N
if @.Destination = void
# I& J! @, G7 A then -- no transport order for vehicle @
( L X) o2 K# o& P- Y i @.Destination :=" o0 _7 g" Q2 _ p3 Z
rgManager.nearestFreeStation(@,track.~);
c6 r: Y; v$ P$ B0 S newDirection(@);
% n4 E. Y2 g% j2 ?7 P h& ]$ H if @.Destination /= void then
1 s" P$ Z. N- G @.Destination.NumReservation :=
1 K7 ]' h9 t" g, s8 d @.Destination.NumReservation + 1;
# [/ u" i" ?! A/ v! g3 V end;3 R* k5 p8 o1 `# L
@.CurrIcon := "drivingHome";0 X, n% L1 {$ E! b% L! [/ k
@.DrivingHome := true;
, n# P1 L `/ V/ E, d end;" N, g( @* `/ L8 q+ U4 A+ h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ e% J- M! M6 m. o% ~ r: t
part := @.transpOrder;
7 P) k' T4 [$ ~ r7 G part.move(@);-- load part
0 S0 N2 g- G) I! T& w& ` @.CurrIcon := "load";: ?' ]4 A: M8 x* S; n! B$ i0 _) P
GlobalDistObj := part.globDestination;7 P7 ~- F) j" v' Z5 l- {8 F
assignLObj := rgmanager.rgAssignL;/ t8 C0 ^, f, o8 `" e) k# g7 [
row := assignLObj.getRowNo(GlobalDistObj);
* a/ b1 _7 x! N9 o: u: ~9 E if Row = -1 then -- since 70: F: _- \* r- k2 |% ]$ p6 `
if lan=1 then
$ a/ s9 M6 W, j% R! R( Z1 X# L+ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! e% q \: h& i8 p
to_str("in der Andockstation: \"",?.~.name,"\""));
- E. o* S9 K1 E" o else
/ I8 o" h) T4 D0 Y E, t- D, S9 S. W1 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ U# C! V- y2 R
to_str("in docking station: \"",?.~.name,"\"")); 1 A+ b8 A1 D2 K `. \+ \, k/ s: J" b- m: a
end;
! y4 s2 k1 z% R% p else2 V. J/ z# A# C m
@.Destination := assignLObj[1,row];$ u- X& j z( F. Q8 {, ?, q. V
end;
% h" R$ n" l. Z, |+ b newDirection(@);
( [" q" G( C% I0 _! q @.HasOrder := true;
; ~6 @! c" o5 p* ~6 x end;; K5 e4 Q. w- u) k& i) v
end;
+ ~$ y- k5 m7 N# H* d5 i0 ?/ k7 A( Eend; -- of the method4 Q- _+ ?9 Z7 c, ]6 z& ^/ t8 O8 `
|