/* called by: entrance ctrl of the object 'track'+ O3 B3 B# P) w! K4 T4 U
*/0 a8 O/ d4 d6 k& \5 C# v
is
* e, T: k. I- ` W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 D1 T3 G1 y, N _+ @do: o5 c! ~; _- L$ S j
Lan := rootfolder.Internal.Tools.AOLlanguage;; Z. X+ Q% h0 e- `+ t; }1 M' W
if current = @.Destination -- else return! g* O0 ?, ^: k+ _- l
then# e" _. T7 a: w+ Z3 m
@.Destination := void;) a, S2 d% z0 ]& `* q( N
if @.occupied then) Y: U- q8 a" D( j% D( k3 E
part := @.cont;0 D' y, j8 e7 v
@.transpOrder := void;* P+ y5 K- h0 }) c( m- h6 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! ]2 ~; G3 N* ?" T8 L) J
@,root.eventcontroller.simTime);
6 _/ h4 K e1 ? @.HasOrder := false;% ?3 U/ a8 o5 n# q
@.DrivingHome := true;* m, B# W0 E+ ^9 l
rgManager.tryToStartTransOrder;$ \. R- F, \1 i
if @.Destination = void0 u8 p: q k3 C3 J# r, d
then -- no transport order for vehicle @
' Y9 E: l: j. ^4 F" e7 ^6 x$ n @.Destination :=
: w1 [( B. k1 o- h rgManager.nearestFreeStation(@,track.~);# r! [0 A1 j4 I9 z3 k7 C9 a6 v# y' N
newDirection(@);
# k* N1 A" | B6 M if @.Destination /= void then
2 H( e; m! z( V" K% U @.Destination.NumReservation :=2 l) @1 ?, h% ]# i7 ^
@.Destination.NumReservation + 1;( D( L! a7 V8 w# h+ B
end;& v9 z0 ^3 ]8 m( u! {
@.CurrIcon := "drivingHome";& o+ w# S5 g7 G" J4 S: ]
@.DrivingHome := true;1 _7 B9 f* K2 x# i
end; b( G9 f/ @( F: d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g0 p' \/ X5 A6 ^0 A part := @.transpOrder;' O( J! ?: ^% N1 P' o, r
part.move(@);-- load part
6 x- }. ~! l% [0 q @.CurrIcon := "load";# t( d3 a. w8 E5 I/ L; d S6 o/ X
GlobalDistObj := part.globDestination;8 s; \" P6 {2 \1 t
assignLObj := rgmanager.rgAssignL;# e6 q+ z& L) c5 j) O$ @1 [3 E
row := assignLObj.getRowNo(GlobalDistObj);
$ a% k6 W* i: D' l% b' j if Row = -1 then -- since 70 G; k2 x; L, d3 L
if lan=1 then
! P# d2 \7 w9 F5 n8 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# |" F& s: ~7 L" [: e4 y
to_str("in der Andockstation: \"",?.~.name,"\""));
( e/ E7 O1 M( \9 b# V) u9 z2 u1 Y else8 M7 z) v* C5 I! C! O2 @- z+ b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! O, C# {: }+ B- _. | to_str("in docking station: \"",?.~.name,"\""));
, U" M: Y6 S# q% T G end;
& L6 l, A% ?8 } else! F/ N, U4 Y x" V0 M8 ?1 h
@.Destination := assignLObj[1,row];' n' E3 q) T0 F. s6 u0 c R
end; % W' p6 H% Y' D' A
newDirection(@);
& I! k5 {, \7 q4 N @.HasOrder := true;$ b+ r; ?' C: w" ~0 J
end;. I# o6 O/ i1 |1 f6 v. s. a
end;9 I7 R5 N! r# S& \
end; -- of the method r4 n1 h% n& j% ^
|