/* called by: entrance ctrl of the object 'track'
2 P7 n7 u1 N2 D/ U*/
3 E2 K6 U* y/ E6 i3 k1 jis: K; o1 W3 ^: ]! ?: T* e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 d3 S4 c' |. f4 ldo* h# g$ x5 E! `, I' G
Lan := rootfolder.Internal.Tools.AOLlanguage;' ]# @1 t0 R, N5 |$ H
if current = @.Destination -- else return6 f t7 l/ h5 d' D
then
; Q' @( H: K Q @.Destination := void;
$ J7 j; x5 d+ a' x( S; q# o if @.occupied then W* r7 ]& c3 G6 ?$ N
part := @.cont;
8 i2 E# y& d2 c/ d7 j @.transpOrder := void;8 C2 x8 ^% ^9 V- r7 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F1 S( ?- j, t; o* h# h @,root.eventcontroller.simTime);
5 h0 R4 W. F) }9 E: I @.HasOrder := false;
! [6 @. v3 Z, e' o( M1 Y2 s @.DrivingHome := true;
A( q# L/ f) Y) C) `& e rgManager.tryToStartTransOrder;
: a4 g* L. ~7 u3 f) I: Z if @.Destination = void* v& d. ]1 J4 |8 O3 X# b
then -- no transport order for vehicle @) ^$ A4 i c. @6 [8 P' Y/ y: h
@.Destination :=
8 x4 b# z: ^3 W! S6 s, z( W rgManager.nearestFreeStation(@,track.~);
8 @5 Z5 ~4 L; Z newDirection(@); ( R& r: l2 I+ J; e- |
if @.Destination /= void then
2 V0 G% { [% D' \3 Y @.Destination.NumReservation :=
$ u) ?1 s. L9 [% z, T @.Destination.NumReservation + 1;
) r8 i2 {5 s# M: O! z3 s end;
4 p( u7 q; t) l! S* ]# X* w7 P @.CurrIcon := "drivingHome";* [: |- D+ X7 X Y) w
@.DrivingHome := true;7 Q& s9 X# G- c# v: ]3 V1 L
end;
, L! u/ {4 g; U/ I else -- the vehicle @ is empty, both vehicle and part are in the same dock station: V) O& \+ z4 w5 ?
part := @.transpOrder;
5 ]" R; G' |- S+ T, K. t part.move(@);-- load part' U, q- ^, k: C) M; S, Z4 k
@.CurrIcon := "load";7 g# c' {4 r) g9 n9 T, \. R* x4 o' Q
GlobalDistObj := part.globDestination;
& j0 P6 R, @+ `9 i9 O4 p assignLObj := rgmanager.rgAssignL;
. I3 x) | y6 ^9 B row := assignLObj.getRowNo(GlobalDistObj);( [& `% w u( ?5 O
if Row = -1 then -- since 70
8 B$ p/ T0 J F1 I+ I if lan=1 then
. b9 k' L* ^! n& t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 D2 Q6 [; y Z3 Q: y: ?' Y5 V% ? to_str("in der Andockstation: \"",?.~.name,"\""));# N2 v W9 a- A6 U5 g2 b6 U! Y
else4 w! L. o# G/ ]9 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ O' o) W1 L2 D
to_str("in docking station: \"",?.~.name,"\""));
! Y+ j5 s6 b8 w1 l2 D end;3 O& B. U/ d0 ]4 b5 K
else; @' J2 f. b$ w: D; ~5 k( F
@.Destination := assignLObj[1,row];/ }; M2 M0 K/ X5 Q
end; 2 R/ J) C2 Q4 b
newDirection(@);. Z( R& p9 W/ x- K
@.HasOrder := true;
. u3 ]" j' n& ~6 l2 m a end;
& E7 c8 t4 }- y1 a: M* x+ R" |0 Y end;. M& ]7 ^! e+ x |
end; -- of the method% G4 J/ m1 f% f+ x, a2 p
|