/* called by: entrance ctrl of the object 'track'# |& O# x4 o: G, L" B) g
*/. n2 j4 d$ ]9 ^1 r) Q
is
& {; q: W7 F/ o9 `6 D4 X2 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;* L2 `& ~) w3 W+ s
do# @6 [$ o* {8 b5 `) ?8 H
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 w3 B6 H2 _7 S& A if current = @.Destination -- else return' a& D; B6 w( T3 c3 T0 H: k
then
/ D9 P+ E6 V5 z! X @.Destination := void;
+ T: I7 w* P5 f5 f0 q if @.occupied then$ z3 _( J2 C" {- S4 {% m. `+ z
part := @.cont;. I; u9 I K+ J/ D* O* ?1 M
@.transpOrder := void;
! [3 I) X' w& o$ n, w+ G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; q2 p, y# [% f
@,root.eventcontroller.simTime);3 ]! X7 w- G# a1 v" a
@.HasOrder := false;, `$ P# Z! N4 i. |4 P
@.DrivingHome := true;& E& y# m! C) Q! k! s
rgManager.tryToStartTransOrder;7 r- L4 @* i6 j
if @.Destination = void1 n+ K* n4 X; y; F$ r
then -- no transport order for vehicle @2 d- i) u3 @, s; b
@.Destination :=- A6 \) z- H8 v# B* v
rgManager.nearestFreeStation(@,track.~);
/ V/ u( {4 ? K9 J. s newDirection(@);
# T* a& o7 w! b5 g* C0 E" p7 u if @.Destination /= void then& L a' u$ k, m6 F% A$ ^+ w( ~
@.Destination.NumReservation :=
: y6 X, I: O5 V5 b, a4 P @.Destination.NumReservation + 1;
9 l* [! Q/ u7 _& p# r2 Z8 F0 J end;: @) J* e2 c% N# Z% |# J, x6 G
@.CurrIcon := "drivingHome";
) m/ w( \ V0 U+ Y; Z& g6 U @.DrivingHome := true;, P, e) M9 `; T0 u9 B" k
end;
) v, Q0 ^! W8 F/ Q; O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 _. j Y% a7 j& G3 O part := @.transpOrder;' Z; J+ K( a/ D! O; T1 n7 h; ]3 W
part.move(@);-- load part a. q. P% [# \# J4 }
@.CurrIcon := "load";4 e) r; l- J8 f! [4 ~
GlobalDistObj := part.globDestination;6 [' @) Q2 n. r5 i7 t# o/ ]
assignLObj := rgmanager.rgAssignL;
; D) ^: R- _* ? c5 Z row := assignLObj.getRowNo(GlobalDistObj);
8 o& O/ Z; F; j0 E1 Z: z if Row = -1 then -- since 70
) a7 c4 J, G6 |; u( M! _. V: q if lan=1 then5 y3 o" r5 N* {* d' D% w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# k$ u3 i4 a. J; {$ L f6 C* g
to_str("in der Andockstation: \"",?.~.name,"\""));$ {$ W" k' Q5 Z0 V+ @
else
' w; T3 X' K5 q, h Z2 r# G% T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: b6 ~+ i3 E. M. v! F$ \ to_str("in docking station: \"",?.~.name,"\"")); 3 e- z8 b* o& ~. r" ^$ \2 r
end;' n5 w E. O$ G8 b
else& Q1 V# v( C. t6 E, P
@.Destination := assignLObj[1,row];' b9 r4 T2 \0 y, } [% A% x
end; 4 n: r) M. b* l( }) C0 Y2 k+ N
newDirection(@);
- [% z1 [. s% y. M% T/ _0 d- B4 C @.HasOrder := true;
: Y+ }6 O" g% J1 d end;
" ^) M4 j8 P# B: Y8 l end;; Y% ^4 q% ]' ~& V# {3 @
end; -- of the method
1 U2 X8 L0 F3 y/ a. v" Z2 i |