/* called by: entrance ctrl of the object 'track'
- g- w; V. z# y+ L( [2 I ^*/
/ f0 R6 E& M1 S( u: @$ Jis& E; L* W D- M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& b! [0 [9 Z6 |
do Y7 u% Z5 E& A6 ^3 x2 ?! N5 f
Lan := rootfolder.Internal.Tools.AOLlanguage;7 O& J1 s- w M r) X1 c
if current = @.Destination -- else return7 {3 H V( a! W( }
then
! z- u% e4 d; x" j$ Q2 O% f, } @.Destination := void;
! T D5 M% t/ z( A& q if @.occupied then& T% o- {2 b5 s. q5 `- `1 J
part := @.cont;
+ _) z* G$ r5 \' \8 i' t+ C. ?. o @.transpOrder := void;
$ ]. g: W# D5 j; {# v8 q) h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 e; L5 _; v- C
@,root.eventcontroller.simTime);
+ g# y% A# d2 C7 s @.HasOrder := false;
0 Z4 X5 }# w: B( W! a, X @.DrivingHome := true;
8 [; Y" J) k! G% t: F$ L; c3 C$ \ rgManager.tryToStartTransOrder;
9 X4 e" e7 ^" l1 C# ^7 \8 { O if @.Destination = void7 Q3 ]: ^7 ^! U# v' M
then -- no transport order for vehicle @
$ E' t/ K! x: p- h2 w, J( | @.Destination :=
+ a+ G; n2 D2 O7 l! L$ a rgManager.nearestFreeStation(@,track.~);( E& L2 h, n/ E
newDirection(@);
i9 p! q9 b. ^: Y! ?5 G4 [: ^% a @ if @.Destination /= void then) H$ w" p$ [% {( s; S( ^% j8 X! y
@.Destination.NumReservation :=
+ r( [6 N9 q; @0 \* T @.Destination.NumReservation + 1;
5 x# \- K3 u: c* U0 w" h0 p end;
- l9 G/ [% n% i! W @.CurrIcon := "drivingHome";
# Z" b1 M. C! Z A1 |9 z/ [% g @.DrivingHome := true;+ F3 c! V* i5 o8 [2 r2 E, Z. `
end;
: Q+ i2 D# t0 E( I& } k0 C; F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' |' B; i0 R$ X: m( L* |- O part := @.transpOrder;
- L1 t; ^' [( ? m part.move(@);-- load part
0 N k) ~* k) u/ J: D4 p @.CurrIcon := "load";
, `3 i/ m$ R" l GlobalDistObj := part.globDestination;, s6 g! f2 g3 n' ]" H/ r9 h8 T
assignLObj := rgmanager.rgAssignL;
- w- p7 I# N7 {, {: I1 C+ ~; b row := assignLObj.getRowNo(GlobalDistObj);! N0 H7 H* G2 T( _
if Row = -1 then -- since 70: h4 o# F* e) X- v1 @
if lan=1 then
* j7 ~2 V1 T* p3 V. [' q5 Y8 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. E. U4 ?: x: _2 E; i, Z
to_str("in der Andockstation: \"",?.~.name,"\""));5 K* R7 r R8 I( X7 d& r3 U
else2 k: |0 `; y1 _. P4 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 |: I5 L3 Q- e; ?
to_str("in docking station: \"",?.~.name,"\""));
2 l0 f4 n* c0 X" b end;
0 Y7 r4 J7 `9 z9 i' G; R else
/ f6 V" o" T2 t' C @.Destination := assignLObj[1,row];
$ _, l; { Y; f! Z6 \# K* a8 J7 d end; 8 O8 K k6 G C( n' D
newDirection(@);& U2 L$ n# [5 i7 q
@.HasOrder := true;5 `1 V* F3 K$ C0 r4 X/ ]
end;8 L- g) J4 f1 G! K
end;
9 Z$ ?4 P1 \4 T& k/ r8 Xend; -- of the method& Q. I0 D4 p. U$ A+ _, x
|