/* called by: entrance ctrl of the object 'track'
$ T9 Z* Q3 Y# j5 H5 v*/
$ e- L' n. W+ C9 s9 Sis1 Z3 x+ R+ T% j$ \" ~* S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! ]+ {. {4 W8 T3 x3 udo
/ @1 J% `2 ~$ M: e- x3 _% d Lan := rootfolder.Internal.Tools.AOLlanguage;5 A$ `: q& c$ ^/ v. q T+ [4 B& h+ `
if current = @.Destination -- else return( {$ y' V; S, p! |
then
/ k# m1 P/ @ P: l2 p @.Destination := void;
1 }$ q) G t% w" }& M1 k if @.occupied then) K4 A; P- G. Q( M
part := @.cont;
8 m; [5 Z! Z, A7 }( q @.transpOrder := void;( U8 k7 V2 ]. s q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 }0 p+ U) E% h4 C$ i5 I5 c9 k6 m( t* b
@,root.eventcontroller.simTime);
% [3 w- t- t' h% J' X$ \ @.HasOrder := false;0 N. |- X! }0 z& e. V
@.DrivingHome := true;
8 ^) N2 Q% N/ i: V4 _ rgManager.tryToStartTransOrder;
( |; j" C/ g. L if @.Destination = void
! [+ o* o/ J4 a- P, E% P7 B; m) s then -- no transport order for vehicle @2 e! F0 Z3 `# {, a7 P
@.Destination :=
. R& N) ^8 A/ R* _8 P3 K- [ rgManager.nearestFreeStation(@,track.~);
; D d+ u9 ]! L$ m5 V, N newDirection(@);
* ~5 g7 @( X! v' X0 Q if @.Destination /= void then
. d( J) O7 V, m2 l7 y* N @.Destination.NumReservation :=, l; y+ w; l, p3 C" ^, G
@.Destination.NumReservation + 1;
; [6 u8 N/ C& ~. D6 y+ F# y) z end;8 f8 I# K4 e q' P/ {4 |# ~& ]2 j" B
@.CurrIcon := "drivingHome";
4 Q X9 n" r8 N0 K! h5 s) z @.DrivingHome := true;
' I8 P {! l% r* ] end;8 |+ n$ A1 ^$ m* Y: g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; b4 S+ S8 j5 q2 O2 ]+ u
part := @.transpOrder;" s" u2 j0 Z" |2 L( m& |: `" _
part.move(@);-- load part
2 ^8 B% y$ N- O5 b4 n3 V9 M" H+ C1 v @.CurrIcon := "load";8 n8 R7 z) Z0 v4 @) R
GlobalDistObj := part.globDestination;/ S! B: X, x* e7 O
assignLObj := rgmanager.rgAssignL;
, m9 _! J8 E" M* U8 v2 ^% L4 _ row := assignLObj.getRowNo(GlobalDistObj);4 k1 L# R% O( B: q. s8 i
if Row = -1 then -- since 70; P' p/ t( b C8 M, o, U0 K
if lan=1 then
2 d$ ?2 q. f! Y' ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ]" S- h' }+ d% M7 Q7 [. c! ], H7 Z to_str("in der Andockstation: \"",?.~.name,"\""));/ s7 L5 n4 Y: X7 r# k
else
- K) P8 F( b9 ?5 M. w3 E0 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), q) U- ]- J) ]! D) _" i1 E6 v `
to_str("in docking station: \"",?.~.name,"\"")); 1 P3 o* X7 ?2 d( @4 u
end;. C3 _+ N3 v7 o* ^: L
else
6 }8 i, Y/ k4 q n! S4 j% } @.Destination := assignLObj[1,row];
2 @! V* p! j7 S( L end; 8 X+ q' Q: k% B( B
newDirection(@);1 I( V) |! [; `: c9 f
@.HasOrder := true;0 ]% W" ]1 j* k3 w, o
end;
# G2 o1 `9 M3 e p end;
& f: o' L7 ]4 c$ s) Z( Cend; -- of the method* k) c1 s+ J" E2 b0 R; r
|