/* called by: entrance ctrl of the object 'track'
) ^; @* z0 l" K# F: @*/1 M; p3 \+ o0 p8 v- `1 u" U
is
) S, C1 b3 g, B% m1 ?: r6 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( S B* E& E+ z8 N" g; v* ddo: f" H( I6 ?8 F- P3 O- \: H* F7 g
Lan := rootfolder.Internal.Tools.AOLlanguage;
# l9 q/ W! w+ C5 B4 m2 U if current = @.Destination -- else return
* T6 [+ y& w2 {' }/ H' \ then% V$ u/ m6 i, E* |" ]) ]3 P
@.Destination := void;
$ r4 H2 S' y: |' Q1 t# r7 T if @.occupied then1 w) \7 f' Q+ Q
part := @.cont;
. Z1 |* s- @6 N A& X6 a @.transpOrder := void;
+ H' T+ H+ e1 s8 L3 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 Z* d7 n) |5 r" {
@,root.eventcontroller.simTime);3 h+ V8 O/ m9 Z/ r
@.HasOrder := false;
- g' \' _/ p; j" J6 w0 b) C0 q. i @.DrivingHome := true;
7 ^+ \! p I7 d; J rgManager.tryToStartTransOrder;- z0 R' F A0 h$ r- N- R
if @.Destination = void- t U+ A/ L& v+ R
then -- no transport order for vehicle @9 h( E7 Q4 q& Y2 s& g( }
@.Destination :=
4 B0 T/ A4 S$ ]% y/ i1 B rgManager.nearestFreeStation(@,track.~);4 \! c8 T: E7 d) Z
newDirection(@);
0 v* k" c+ I9 w p if @.Destination /= void then, K, U9 [8 f+ I0 @$ Z
@.Destination.NumReservation :=
3 Y9 w0 i& d+ u* I3 ~3 t @.Destination.NumReservation + 1;6 j2 [8 Z W; N" D4 u! P
end;
+ L8 u: M2 \# V. j. `7 P Z @.CurrIcon := "drivingHome";+ f* s8 i* O y% i
@.DrivingHome := true;
! V; u! ^, D0 w- `- Z end;7 {1 n3 z/ F& u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, i4 N! p2 |9 z
part := @.transpOrder;! o7 C+ u+ u3 \, R- V1 M. j f
part.move(@);-- load part t/ t$ k8 {* U+ h
@.CurrIcon := "load";
$ d' x, V/ `0 N; ? GlobalDistObj := part.globDestination;$ ?' |4 M w! t' E" W T
assignLObj := rgmanager.rgAssignL;. ~: W" Z2 Q! f, ~7 H
row := assignLObj.getRowNo(GlobalDistObj);5 ]. p: L, i P9 U
if Row = -1 then -- since 70' A2 T+ l' a) G
if lan=1 then
# \$ `" ~' Y3 G( m! N) {+ f( z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ z2 C" C0 }* t; m8 I2 X1 e to_str("in der Andockstation: \"",?.~.name,"\""));; ~4 J0 R' e- w; Z6 k" ~
else
# C. T; F9 P N$ q( M; f" y; z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, H% o0 J1 d z8 w8 J A to_str("in docking station: \"",?.~.name,"\""));
; }3 q! n$ V) r) B: u& {$ K+ G end;- `0 z5 U$ h! c9 r
else
3 c: ~2 \" s p! | @.Destination := assignLObj[1,row];, |0 e( [5 Q& k
end;
+ C! d F0 k* l4 E newDirection(@);
4 _+ I2 B( W! q4 E/ f& v @.HasOrder := true;
! T# m, g7 l2 L- K0 H end;, m+ O- x3 S! |0 m7 v: T
end;: |8 c* s$ A4 o9 y* E5 |
end; -- of the method
+ [) m& ^+ K' f* U8 Z |