/* called by: entrance ctrl of the object 'track'( n* ~1 e7 \$ Z
*/
; [5 M6 ^3 t& @- a" w& g8 kis
: q9 V) ~- e4 o* ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ]# u( E0 l8 ^: w W
do$ J. a7 \ V* V5 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H- n! n M- G( \% L) H if current = @.Destination -- else return7 Z8 R3 o1 m; y
then; e8 V: i! @- _! P$ P
@.Destination := void;$ J6 Q4 r9 {/ S7 P {% D+ e6 F
if @.occupied then
8 [( ~: f* w4 T part := @.cont;# c" o; W. z5 p8 _
@.transpOrder := void;
5 y( E! ^" ]' {: W7 B6 }" Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; }1 |/ `# {: O5 G
@,root.eventcontroller.simTime); I' n5 o7 w7 d: x9 J
@.HasOrder := false;
# ?! S1 j1 J* a0 l4 n, b0 i @.DrivingHome := true;) @: ?6 h' t1 p, a( @
rgManager.tryToStartTransOrder;
( s e4 z* A+ P1 x if @.Destination = void
4 c: [6 ]' E' _* { then -- no transport order for vehicle @8 a$ D; v; W5 j" D, [
@.Destination :=
3 H9 i- s& {0 J2 L! M rgManager.nearestFreeStation(@,track.~);+ n6 B$ E1 Z! c8 M7 B z! {
newDirection(@); 4 R1 }5 [% a. I- D$ |
if @.Destination /= void then+ a* B, C5 p+ M: c& O( F. o. l
@.Destination.NumReservation :=
" \' J8 ~$ K0 I6 P8 B @.Destination.NumReservation + 1;
1 R& d9 }6 \* g/ H9 \* m; k end;! G8 H9 S: V, i; k8 `
@.CurrIcon := "drivingHome";( I7 a, l2 Z/ B7 t
@.DrivingHome := true;
" m* U) H3 N* j6 U F end;
' b6 X5 C$ \% |6 h4 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 H. z. m0 F c4 V8 c9 Y
part := @.transpOrder;
5 _5 |3 X# C1 { part.move(@);-- load part
6 {' N4 Y4 S0 Y6 C @.CurrIcon := "load";5 o5 L. u( a0 Q
GlobalDistObj := part.globDestination;# q( G+ Z+ d; b# a
assignLObj := rgmanager.rgAssignL;
! b% n4 V& d& X3 b row := assignLObj.getRowNo(GlobalDistObj);
$ J$ g8 _# S: m- V' v if Row = -1 then -- since 703 y( `! C% D; E& v
if lan=1 then
- B! F0 _+ E. }* p# n& @" }) U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
w" K& D& |/ {+ H. P$ c to_str("in der Andockstation: \"",?.~.name,"\""));2 |, C% { e+ M, ^
else
9 q" V- c1 z, j9 {/ s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& _3 ~* D/ e1 E6 D2 F to_str("in docking station: \"",?.~.name,"\""));
1 O2 K1 i( N& b* B8 g end;
6 j* L& ?1 K& b( }1 ?. o+ n$ ^ else, W0 F# R$ s! h* K& |" y! g- a
@.Destination := assignLObj[1,row];
/ V* Z$ `0 B( l0 s. o- w end; 9 H' e$ Y& |7 l! x* K( }) h
newDirection(@);
1 c* z! b2 D+ [9 r" c& w @.HasOrder := true;7 D3 o: J1 T" M8 P0 r' u8 C' z
end;! A* O7 {+ H+ S6 @
end;
5 e0 H; ]: g9 @% U' ]9 \6 o9 oend; -- of the method2 k- |2 D5 W3 @5 p" P( C: D% {
|