/* called by: entrance ctrl of the object 'track'9 S$ x' s( o' n: r! u* d
*/, ^& a: {, Q8 b' a
is* r9 w3 `) z" B/ e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y1 Y. |" D3 {4 s+ L
do
. {) I2 l* h' i! D: q Y |9 A3 R Lan := rootfolder.Internal.Tools.AOLlanguage;" R; f& k& A7 h( @4 M
if current = @.Destination -- else return
0 j, q/ p* i/ F& z then
, X) N) a: q* k2 u @.Destination := void;
9 y8 {) [% k, `1 N( J' e: | if @.occupied then) p5 M4 O8 [3 U9 r0 U
part := @.cont;
: ~# o# N4 K: |- I' q7 ] @.transpOrder := void;
7 f; [- D& ]& G1 L9 k' F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! K5 ?" }3 t5 K7 d" r6 E. r T6 J2 d @,root.eventcontroller.simTime);3 K8 b3 |: `- f3 V0 p2 S9 G: a( v
@.HasOrder := false;: ~: R+ B9 [2 s a* |
@.DrivingHome := true;
4 M" h0 \8 \4 [ rgManager.tryToStartTransOrder;
$ f' M# j7 a0 P. |, p+ f1 l. m( p4 X if @.Destination = void* o4 Q8 }4 W! C& b2 D* w2 K0 N
then -- no transport order for vehicle @
& s6 B1 E% j9 c) R @.Destination :=1 p1 V1 E' C% b; a
rgManager.nearestFreeStation(@,track.~);8 q/ E, [$ }, d( G! D
newDirection(@);
- c8 B& ]6 j% T* C3 c# y3 s3 P if @.Destination /= void then- B$ |% Y) O, h
@.Destination.NumReservation :=
. Y& O3 X1 _( m+ Q: e @.Destination.NumReservation + 1;: f- K0 ^' \" `3 U
end;+ u6 I, `3 q- I; @6 x
@.CurrIcon := "drivingHome";' W4 G+ n5 \& b
@.DrivingHome := true;
6 n; E; p, Y" A( j1 s) y% ? end;( p; X/ O6 D% H, r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' B" f% [/ R9 a; n; B part := @.transpOrder;+ U$ J1 Z" b) V% l% D: s
part.move(@);-- load part/ }' {: C9 ]& E3 z/ ^+ F; Y9 z
@.CurrIcon := "load";. G* B9 V( A7 f: _+ d
GlobalDistObj := part.globDestination;7 W# H3 E" h8 M7 E0 h z
assignLObj := rgmanager.rgAssignL;
Q& l. h, Z4 @: O0 `6 T row := assignLObj.getRowNo(GlobalDistObj); i* M. w+ |, h) C: _: ?5 G$ v
if Row = -1 then -- since 70& x( A6 V& R5 ~4 F; f
if lan=1 then" F" G! T+ S7 \' ?( b1 z- _4 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ^8 [& B6 L2 D" @. B8 @0 _ to_str("in der Andockstation: \"",?.~.name,"\""));
3 t4 v6 ]3 }+ s% T$ k8 h- G! d else
, L* W' `& E% X. Z8 h. m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 z5 b5 M% S/ i' @0 Z. D to_str("in docking station: \"",?.~.name,"\"")); ( Q( Z2 A: g9 R( W* n1 h: [
end;) z# ~/ Z9 Z9 ~4 i; Z u
else
4 `% A; `4 Y. c2 B/ F @.Destination := assignLObj[1,row];) Z5 ~/ Z5 Z2 p7 ^: Y
end;
7 k& \' c* L/ I2 |# U' I+ h newDirection(@);
( Y6 S0 B1 K4 W$ B! J% A+ l @.HasOrder := true;4 m+ C6 f t9 q& Y" j* |( q
end;5 }' A; `" ]- T: H
end;
K: A$ v* [/ O2 }3 `- Y& Zend; -- of the method
6 {* E8 h2 n' y: C% b0 ~ |