/* called by: entrance ctrl of the object 'track'# M- F( F \* J' D) p
*/7 M, r% V* _' W* d& ?
is+ X! k7 b/ q" b& s: q6 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# U$ g4 k- _7 z( D8 I
do" q7 y; S; l4 {% }, G0 V# F2 n' }. X
Lan := rootfolder.Internal.Tools.AOLlanguage;
( M' x: [- T- G' y( N# \- |. a) K! h if current = @.Destination -- else return
) s8 t" [# \) K" W then- z l* d5 k' G# a3 P+ R
@.Destination := void;- M0 D) s0 m5 A6 l3 v
if @.occupied then
: S4 B& [+ u% F0 e3 Z! j9 X part := @.cont;
$ ~& ~0 I$ o; w @.transpOrder := void;
' Q. R/ N$ x, ]6 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& g' J4 l5 c2 ?- F1 p. i! d @,root.eventcontroller.simTime);5 n, O; Y" f) i z
@.HasOrder := false;
5 T* V2 Y; x6 ~ @.DrivingHome := true;
4 e, n$ [$ X. P/ i( [; S, a rgManager.tryToStartTransOrder;* i- d$ @/ s- d
if @.Destination = void
0 S |* U9 y. u2 K0 m, Q then -- no transport order for vehicle @
4 @4 x5 a1 o$ `9 j @.Destination :=* G u& }% h1 k G9 ]! @
rgManager.nearestFreeStation(@,track.~);
: v. D# i* f) B+ F newDirection(@); . s4 }8 l- h( E# g
if @.Destination /= void then5 C9 F8 R7 I4 Q, ]* `
@.Destination.NumReservation :=
% R; x# ^0 q/ O* a5 n9 V9 L) ` @.Destination.NumReservation + 1;& H( A) |6 [8 `+ U6 ?
end;
~3 ~5 u, P8 B& K+ r8 s @.CurrIcon := "drivingHome";9 W/ b r8 R. T7 u: A" g
@.DrivingHome := true; x* \8 J: e* c0 ]8 e
end;" a' D. d. _" I6 ~# _& r' r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 i7 r2 F) K+ U
part := @.transpOrder;
, T1 q1 D- ~4 \ part.move(@);-- load part
+ {; D+ f& M1 A! y @.CurrIcon := "load";" B7 X8 u- F. [8 n/ S' _
GlobalDistObj := part.globDestination;3 I3 a# |+ V" V- |2 O9 a8 c
assignLObj := rgmanager.rgAssignL;' u2 U J7 z$ b4 S3 `$ Z
row := assignLObj.getRowNo(GlobalDistObj);
. \3 z) ~; U' s; m+ L" K7 o' _ if Row = -1 then -- since 70' z0 T* \8 N5 m. `3 N5 N( j
if lan=1 then
+ \& `+ l0 W; T6 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 c0 f' ?5 R& B) `' \ to_str("in der Andockstation: \"",?.~.name,"\""));
% e( E I4 z- R5 Z; B0 ]# Z+ _ else. N8 q. f6 ^- G: j! u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* L p$ w8 Y5 H, h+ m1 w& C- G- k to_str("in docking station: \"",?.~.name,"\"")); & [! Z: I* |- T
end;! B4 T# [( \5 y0 `9 c
else
+ u& S6 q- W! |9 q: y) b2 v @.Destination := assignLObj[1,row];4 g6 r4 O8 F6 l
end; 1 ], e- [3 m1 v a; ~, J" e
newDirection(@);
: I5 e0 T( A9 u' O' d @.HasOrder := true;
1 d/ }4 Z+ l* @/ E2 a; z end;
1 r/ @2 S" {" T- D2 x# Z5 f end;
" J/ g) j6 i, D7 e$ Cend; -- of the method
2 |7 w& m8 x' y# n' G' {; b |