/* called by: entrance ctrl of the object 'track'
o E) U8 M/ Z( U: Y) ]: x" g*/4 Y' J3 N m O+ P
is
3 C" t5 R- m/ u& f( V part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 p- u. G/ z. U {2 D- _: V
do
/ {! l$ H1 L/ k( l$ y2 R Lan := rootfolder.Internal.Tools.AOLlanguage;2 M+ F4 j0 o. _9 W/ a' x4 t
if current = @.Destination -- else return
6 s& i+ F3 p& \9 N then
- {% y5 O' R0 ?1 q4 j& b6 F @.Destination := void;% w# t$ _) ~7 ^( v5 L, p; E9 ?
if @.occupied then
8 d& I! Q E a9 H0 H part := @.cont;
/ O6 K, E7 p- q) S @.transpOrder := void;! b+ e# J# v! L) |* ?& v9 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, b, T( ]6 D T; \" p# }" _: |" P
@,root.eventcontroller.simTime);
# M H3 {8 i6 h6 g+ w9 Y& C& C @.HasOrder := false;; f' n* |# c# c5 |7 U
@.DrivingHome := true;5 P2 N" y u8 w2 `6 M
rgManager.tryToStartTransOrder;) f8 c1 c, z) `5 Y3 j9 R9 v x* j
if @.Destination = void
( b$ @- q0 w/ @0 o. {, G then -- no transport order for vehicle @
$ E% g/ n0 v" p0 P @.Destination :=
+ ?# ~5 e( A8 L' K- ] rgManager.nearestFreeStation(@,track.~);
* Q2 H, G k) y( ?8 Q newDirection(@); / ~/ ]4 f" H6 G
if @.Destination /= void then
7 G0 B+ d6 J+ g @.Destination.NumReservation :=" K3 V. _+ y, X
@.Destination.NumReservation + 1;6 O- P. e$ Y( v- ?% _' p" U
end;& S9 i! J. x4 w* w3 r
@.CurrIcon := "drivingHome";
. }, N: G5 ]3 _! P" T F @.DrivingHome := true;; o9 F8 {) y9 L6 j) {
end;
7 p+ O) w) e7 f; c( [. j4 V: o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* }, |" k3 _4 x# ]6 d1 v% Z) f part := @.transpOrder;' ?/ }/ l( E% h* ?% y
part.move(@);-- load part0 n/ m0 k9 H4 J0 E2 {* f3 f; i/ _
@.CurrIcon := "load";
; |( q- r- a* x1 d% Y- j4 v GlobalDistObj := part.globDestination;5 {2 ~# A# t. _2 E! M/ K6 i+ v
assignLObj := rgmanager.rgAssignL;
) I6 A4 {; N1 \- ?0 r2 d row := assignLObj.getRowNo(GlobalDistObj);
M& E3 }: g$ f/ h# Q1 ] if Row = -1 then -- since 70' [* f7 w8 i8 C
if lan=1 then
- o# {6 q+ i |4 K9 ?, k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ C* h# P# v1 g+ L8 F8 g* y
to_str("in der Andockstation: \"",?.~.name,"\""));
: h1 r o$ T$ ]5 \ else$ k7 u+ Q2 ^& |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& d, s f* d2 y5 `; J to_str("in docking station: \"",?.~.name,"\"")); 6 K' Y+ E7 @3 \: Y) T
end;
5 g7 Y% ]2 X! `5 f& F# i- ^( W' E else+ u- n; m* k% \" M" l
@.Destination := assignLObj[1,row];
. f4 w9 Z6 S! W4 H end;
2 J# v" @( J4 u6 m( o( }- `- e- n5 n newDirection(@);
3 s; A. M% A3 ?) x2 s/ F# @ @.HasOrder := true;) ~8 Q$ g0 y0 Y8 u B/ x/ M; S
end;
$ t* A A9 Y+ |# ^9 \- n end;
* v9 o. h7 |7 [0 hend; -- of the method% n$ ?, z3 z: w/ l( X5 A0 p
|