/* called by: entrance ctrl of the object 'track'
7 c) _) m, j6 x% Y$ E$ j*/
1 V7 a' `* R! Gis @ j+ b) f% \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 d g0 _8 ~2 M+ u
do, b& |' F/ [1 A: ~1 e" j
Lan := rootfolder.Internal.Tools.AOLlanguage;
& o8 G3 C6 F9 v# [% [7 k; {( s# ~7 r if current = @.Destination -- else return' W5 ?; j6 |: l% R$ g2 |- h
then
8 r9 t4 L/ ^& d& \2 L( H @.Destination := void;. k. m/ C- c! V4 m
if @.occupied then
% m$ c2 N9 s. j part := @.cont;
/ s8 N& F2 R: G @.transpOrder := void;' L, F0 ]8 A# R4 d. ?7 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 H5 f4 w* `4 _8 d6 D% S @,root.eventcontroller.simTime);
0 C0 w0 |$ z3 C @.HasOrder := false;0 q2 v+ H( E! b; k; O4 f
@.DrivingHome := true;5 \1 F n0 N1 A+ V
rgManager.tryToStartTransOrder;
0 s+ |, b, F# n) }+ X o( [ L/ u if @.Destination = void) I W* ?- h' e: [5 X
then -- no transport order for vehicle @
' c' B/ ]' J: E+ w7 {, W3 i @.Destination :=- z/ B5 X W+ f/ R
rgManager.nearestFreeStation(@,track.~);% ~' m" A/ j) h0 R; P
newDirection(@); ! I: q1 _+ ^% x- |
if @.Destination /= void then
* z% W6 |) R! ^% @$ R @.Destination.NumReservation :=8 }7 {- j: G) y* Y @8 l& W% ~
@.Destination.NumReservation + 1;
6 i! l! W3 Q, E end;, l9 P3 b, z Q$ k! q' p% \$ v2 d* P
@.CurrIcon := "drivingHome";3 ^1 N+ x) Y" r; O, d6 M! q
@.DrivingHome := true;. U' [# d+ D" `- ^" b
end;3 i) ^1 a" Y- ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* j& P/ o. j- B part := @.transpOrder;5 S* @+ w) ]2 d% y; F6 n
part.move(@);-- load part
# {7 X, k( _5 `1 q3 Y1 L @.CurrIcon := "load";* l0 i1 v5 N7 Q1 O( e
GlobalDistObj := part.globDestination;* O+ Y# I% k1 o0 c7 u1 y+ E- O
assignLObj := rgmanager.rgAssignL;
" g* |2 k8 c9 W: Q; g row := assignLObj.getRowNo(GlobalDistObj);. D A5 W; F$ k. I Y
if Row = -1 then -- since 70
# ^/ i9 M9 m6 y& i3 Z& Q if lan=1 then
, W3 |! Q7 M" [ K0 O0 r2 Y& J: O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 h2 I7 D$ O# _5 T
to_str("in der Andockstation: \"",?.~.name,"\""));
# @, F) W3 p5 J( h- h' m6 A else9 ~' @" S" B" J$ j7 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: D6 j) n. }* C to_str("in docking station: \"",?.~.name,"\""));
: }4 n- m) z" U9 l4 B# _# s: w end;
0 ^* P" i, o' J2 O9 _- {- `# u else2 U! f. Y& s& {# @
@.Destination := assignLObj[1,row];
. q1 ^4 Z9 Q/ ?- [9 {( N9 } end; " E0 X; w0 w) v9 L: }' l3 j+ }9 O
newDirection(@);- L- |/ C4 ]5 O, r* S
@.HasOrder := true;
# V! \& b' a9 |' j* v2 b7 i0 H end;
, }! ?6 w* ~1 l1 B) H/ k& ?% R end;
|9 S% w; F6 V# ?8 y- Xend; -- of the method2 z7 d- C; g" [; D5 ?
|