/* called by: entrance ctrl of the object 'track'+ t7 j# x. p) ~! b% U2 [, I
*/5 F. @% @! E0 l8 c. O6 h. L
is
P* ], N( r; T! G, z' U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- c T9 O4 e+ T7 D1 V( Udo
) F/ v% c& Q; r1 c3 r7 Z$ _6 r Lan := rootfolder.Internal.Tools.AOLlanguage;
& |; X+ z1 g& G& B6 s if current = @.Destination -- else return5 `6 \0 w" k2 ]0 x& N
then
6 H" j. _ j; f) t @.Destination := void;; K% x5 U0 m4 ?- H6 ~
if @.occupied then1 R$ O* b2 J/ F( L8 k: ?
part := @.cont;% I X. ]) @$ V3 |. F
@.transpOrder := void;
9 y4 k ]5 G J0 u" ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 b/ z x8 M7 [/ H4 x$ c @,root.eventcontroller.simTime);9 D3 r: e. e* f/ O$ a
@.HasOrder := false;7 ^$ E. e0 E& L4 E5 v
@.DrivingHome := true;
* f- u0 Z( j8 p. W rgManager.tryToStartTransOrder;4 u% g5 P& [" Q2 `, W
if @.Destination = void7 w4 w8 o2 Q! A1 O0 C. ?4 n
then -- no transport order for vehicle @/ V: q& s5 r4 P/ V
@.Destination :=
- |: S8 e7 I ?' |1 r9 M ]0 n rgManager.nearestFreeStation(@,track.~);
: s6 h) ^5 ^5 _$ y1 ] newDirection(@); & T- A4 Q F H3 e' P2 i2 F
if @.Destination /= void then
9 J" E/ v- Z2 o d, P5 ? @.Destination.NumReservation :=/ D. K) D- }$ ?
@.Destination.NumReservation + 1;
$ |" Y6 z$ c! Y% c# I end;* z+ [6 T+ P1 j& J* E+ h3 w
@.CurrIcon := "drivingHome";4 V' S9 A6 e4 y1 v, {
@.DrivingHome := true;
8 q3 A4 V* G; S" n; R1 R end;, M& e" s. I6 D8 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. G8 {% H+ g0 G
part := @.transpOrder;, f& ?- F$ E, W
part.move(@);-- load part
5 ^3 G- z8 r; [+ x @.CurrIcon := "load";+ t+ D, n, D3 J% J! z" ]
GlobalDistObj := part.globDestination;9 v1 g. H6 `; U1 p' u2 X
assignLObj := rgmanager.rgAssignL;9 U% B7 W" ]2 |/ ?/ ?4 [) G+ `
row := assignLObj.getRowNo(GlobalDistObj);: C5 H3 U% J6 u6 B9 U
if Row = -1 then -- since 70
( L( n6 e3 V, |0 h0 x5 Z- F1 [ if lan=1 then
% {9 n7 L: u6 Z- ?1 a: O. x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& h8 i- S. {3 a% E to_str("in der Andockstation: \"",?.~.name,"\""));
% _& ~) ?7 |7 f1 H0 `! E else# I5 V6 J. M( x' G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 p6 ~) u/ F0 }9 B, z$ T' _
to_str("in docking station: \"",?.~.name,"\"")); $ T4 V o' V0 L/ q+ h: P
end;
8 c0 z7 `5 D, ^% L$ J4 [- ?7 F% ] else
5 A) M9 ^& j5 j @.Destination := assignLObj[1,row];5 c) X E# D" |/ t Q ?
end;
& U# g: M' u" \. I newDirection(@);
* E- H7 P8 o+ N2 ]6 p+ g0 d$ P& E @.HasOrder := true;* I0 {, I; K4 B
end;+ D9 j' G9 k" r/ ~5 {
end;
2 O: M9 [9 D* k3 q1 zend; -- of the method5 e8 a5 ~+ O* j5 H$ z
|