/* called by: entrance ctrl of the object 'track'
( ]5 [/ Z8 B8 }$ X*/
8 H# ^8 h0 a& T- D U+ _is, O9 E9 {1 E1 K/ I. r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ]8 A0 p; D" I& L; s
do% j* I8 R9 B A' R
Lan := rootfolder.Internal.Tools.AOLlanguage;" W ~0 J& q5 Z" g: ~& G) j, t9 \$ \
if current = @.Destination -- else return
) C1 m3 \4 d0 f; [ then
E% O" E+ U: j$ u @.Destination := void;; H6 e4 I/ T s$ s* }8 t% g
if @.occupied then
/ | v) j) Z P1 w* Z/ G, Y part := @.cont;& {9 v2 a z' o: G5 C
@.transpOrder := void;
$ f* K& I m6 P! c- s7 e& _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 i& n y1 [& V+ ]- u6 P- |$ \ @,root.eventcontroller.simTime);" V, E0 z$ |3 O) d8 F2 Y, e4 m
@.HasOrder := false;
, B2 Q8 P8 H% B! [3 J @.DrivingHome := true;5 R' g& c0 h0 d
rgManager.tryToStartTransOrder;
}- r9 O: U1 S; @6 q# x if @.Destination = void4 w8 b1 c; f1 R8 n9 L. @$ T, @
then -- no transport order for vehicle @
4 s4 V3 D6 r$ D. _; q: o) m @.Destination :=1 p" t7 D8 y8 x( ^' t3 L
rgManager.nearestFreeStation(@,track.~);& E' ^* k9 K3 u0 k2 G* E
newDirection(@);
, A2 ?+ c* A& O if @.Destination /= void then
" u) k) d8 K" j+ _/ _ @.Destination.NumReservation :=
' b* S5 {4 @4 R4 a9 S3 ` @.Destination.NumReservation + 1;
- J. \8 o" Q6 a& s" H end;
0 E. F# I, v e( \; b, |" v @.CurrIcon := "drivingHome";% C" p5 }, K1 U0 [9 g
@.DrivingHome := true;
9 I& n8 F+ |" g% h! ] end;
O3 @% `5 T' F; ^8 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ N m1 F9 a6 D: x( Y
part := @.transpOrder;
, G- B( q A9 e! y% [* Q+ q part.move(@);-- load part
$ y' [! r3 a9 c4 c7 i3 Z+ a) B7 } @.CurrIcon := "load";
" R( e0 i7 ~8 E' {& D- H1 F8 F GlobalDistObj := part.globDestination;- K! x9 P; c) c1 |
assignLObj := rgmanager.rgAssignL;% x+ K4 x+ o8 ?$ k' z1 v$ S
row := assignLObj.getRowNo(GlobalDistObj);
5 b! k {' V* b! n if Row = -1 then -- since 70
: X8 s8 t! [1 W$ E5 f if lan=1 then# r: w/ v; g4 Z& Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" X# o* Y0 j/ U. t2 c; n to_str("in der Andockstation: \"",?.~.name,"\""));
) T7 q1 o9 F! H3 u% ]% f0 G else
6 P6 w% N3 y. B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 M7 M4 ]: q, j3 N3 L! W
to_str("in docking station: \"",?.~.name,"\"")); ! }, h4 u9 W2 ? F* V; E
end;
: f4 d n; Q) ^' Z1 z else4 O% C8 N' G6 B. x% Z/ s$ h0 |
@.Destination := assignLObj[1,row];; Z, [: @1 G, N% z7 \
end; 8 M+ Q% D0 ?$ d* V4 n
newDirection(@);
/ ]5 J! J+ z _$ O- M @.HasOrder := true;
- O% ?* C; x8 m4 g, `% }0 v end;& @1 _, C! p3 k* d, h2 m( W$ Y
end;
0 Q5 d5 I5 e8 E5 F. fend; -- of the method, R( t2 O6 ^7 m) ?8 D& ~ Y0 `+ v8 _
|