/* called by: entrance ctrl of the object 'track'
% x( k; y0 \& ~# ]! L% H* I9 P*/1 |2 s. {+ `& p% R
is L+ r5 Q9 \; f' i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ F6 f; p8 E% G l
do
: a& |% @8 ^; U/ w Lan := rootfolder.Internal.Tools.AOLlanguage;
( }, S* ?5 u$ [ u& V9 D if current = @.Destination -- else return
+ B% f6 n, n. U* m3 g# f then
! a: k+ } m9 O1 N) ^; A5 ?. X @.Destination := void;
* B }7 u) h* B8 A% A0 @4 Q% o1 ` if @.occupied then4 A! D" b1 {; z( F# t, w
part := @.cont;
3 \1 k2 v4 a" o0 @2 i. ]3 p6 H: Q# v- v @.transpOrder := void;; O r0 P+ p$ v- w5 [8 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* C7 U2 q: o. D* o J' _* L5 n
@,root.eventcontroller.simTime);# t0 w- ~' e& u* A+ f/ T; _+ `, f
@.HasOrder := false;
2 f: V2 G$ L* }+ }7 D2 L- _$ x @.DrivingHome := true;$ h6 `6 y" Q2 Y4 a1 ~/ j
rgManager.tryToStartTransOrder;
6 K( a5 ]2 R1 B, k' B1 I8 `. x6 ]0 p! m if @.Destination = void: J8 I. s* C" J7 p" o- g" j
then -- no transport order for vehicle @
4 O7 z0 }% r* [ @.Destination :=
. Q1 m( A7 F8 T. B; u. |# T rgManager.nearestFreeStation(@,track.~);2 N L% q T' k) K/ r
newDirection(@); + y5 O# \2 S m7 i9 a) t
if @.Destination /= void then
7 ~# \6 m# f" g' O7 Q @.Destination.NumReservation :=' y( X& \7 k7 O
@.Destination.NumReservation + 1;
1 {9 s" g4 m4 f0 |$ v end;/ ?/ `; Z# q/ V8 x
@.CurrIcon := "drivingHome";' r* S4 D( U! I& V2 v4 Z3 B, P3 Y
@.DrivingHome := true;6 Z- Y% A# o0 c ^2 v+ s! {6 s
end;+ W* J, V. I9 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ?; G$ q; d! |0 w% u$ M5 q
part := @.transpOrder;# B/ f: p* I/ }( _* z: ]( z
part.move(@);-- load part
4 V# o. @+ x, G f; i @.CurrIcon := "load";# D: i y5 I5 R! V7 [
GlobalDistObj := part.globDestination;
$ J' e. X$ W! z6 c# K) w assignLObj := rgmanager.rgAssignL;
0 r8 [+ n' h! N9 I& z5 Q* i M9 S row := assignLObj.getRowNo(GlobalDistObj);5 H9 }* ?$ s* ^; w
if Row = -1 then -- since 70
) [) P5 E' j5 R4 Q# W$ M, b if lan=1 then1 W$ r9 p- T% [5 g- t6 F4 g+ ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% b, J: t* a( R7 n
to_str("in der Andockstation: \"",?.~.name,"\""));
; W( W h0 O$ E8 ]" I else
! b# l' l. C% }& D7 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
c; @" n0 Y3 @. F to_str("in docking station: \"",?.~.name,"\"")); , t4 p6 s' r# \9 ~' p- _+ }
end;
7 [. R. o2 C5 z+ A, y else
9 K$ f# d* P/ g* j! `; f @.Destination := assignLObj[1,row];% m! r/ e& |7 B9 k! V% D
end;
% W3 _1 H$ a; m' L newDirection(@);
; J9 d4 ^ T# w& g5 a* X @.HasOrder := true;
9 `& R5 j M1 ?) C end;! y- U' c5 n# k' D% v/ N
end;
b# i- C2 r) b. Oend; -- of the method
# p M$ P& {7 U- H2 N/ F9 c) A0 _ |