/* called by: entrance ctrl of the object 'track'
+ k! q+ A7 P8 W. ~. o3 a/ z* I0 H, J*/
4 P) V% U [2 nis
: o' O/ f5 s R$ j6 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;; [: l, @3 X) p( }8 q+ |+ }1 ]
do
9 H: L" g) I; a5 O0 d Lan := rootfolder.Internal.Tools.AOLlanguage;
$ g/ c1 d5 L& H0 W# K6 U3 |) ~2 b if current = @.Destination -- else return
# n2 k- F9 T4 y) U; ^$ s6 X* D% ` then
7 _% E7 Q( a6 w" s& a @.Destination := void;
% p1 s9 K% v5 D3 N4 @ if @.occupied then9 J+ R- Y0 F: \, Q8 J
part := @.cont;; K: u" m4 y! a2 }& S9 J
@.transpOrder := void;4 N( e9 `( b; t/ k) n b* `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 S, R0 j% }/ ]7 b, S- h
@,root.eventcontroller.simTime); D7 f5 Y5 q. V" ^5 J, v3 L
@.HasOrder := false;
) C W. |& I' ^/ ~8 c$ p2 G5 j1 P @.DrivingHome := true;
+ `1 z# h h- [. ~) i: l rgManager.tryToStartTransOrder;' u. F1 Y/ s' z( G$ [
if @.Destination = void# p' r: h* t& l, {3 i
then -- no transport order for vehicle @1 }( x9 J. ^3 N- O
@.Destination :=: r: U1 A! v5 y3 z
rgManager.nearestFreeStation(@,track.~);
/ z2 U% ~1 l' ~2 ?7 ]$ p4 B, J newDirection(@); 7 ]' z U* F6 O: m; f
if @.Destination /= void then
& ~0 v: N, p+ `" t @.Destination.NumReservation :=( q/ L6 @/ H2 v, \/ k* b
@.Destination.NumReservation + 1;
/ h/ |5 u$ g5 n1 K end;
0 @2 f: h" B1 W: B9 [ @.CurrIcon := "drivingHome";: } I# |, w& i9 @$ T
@.DrivingHome := true;$ y! @, d7 e+ [+ ~1 s6 A
end;
2 d& Q8 O% ^# c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: C1 o9 e; i t. `0 g7 c% c$ a part := @.transpOrder;: ^ [3 H) X2 ?0 ]
part.move(@);-- load part, {/ y. O4 ^3 E" n
@.CurrIcon := "load";
8 m% A( {4 V3 R# c. c9 `4 m GlobalDistObj := part.globDestination;: t' N1 f+ g( w) ?5 @6 W
assignLObj := rgmanager.rgAssignL;
, ~2 Z6 f" ^3 `6 R7 I row := assignLObj.getRowNo(GlobalDistObj);
4 D {- F% b: f0 | R! T! l if Row = -1 then -- since 70' Y; d4 Q# \( V6 `- U% M1 t
if lan=1 then* q! i# {+ Z, B# z8 F5 C: K2 V( W& u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: w" M3 }. w1 K6 s
to_str("in der Andockstation: \"",?.~.name,"\""));
$ y1 q. ?/ P7 u* R7 { else
4 e; ^/ y! x# B4 k3 F- M0 G9 [4 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# S1 a2 ]' W+ n2 D s( j. o to_str("in docking station: \"",?.~.name,"\"")); 9 {( u: `* V1 N$ Z+ B, S- G$ ]7 {4 ]
end;3 j: d" j' r/ i& t
else
* [& H2 I, O1 W1 W1 \ @.Destination := assignLObj[1,row];
. u6 i3 I6 d6 F. Z4 K end; * `/ T0 W8 m' U! m2 R/ Z; d
newDirection(@);
! A* Z- a0 l; n5 Y% m% U/ J9 t @.HasOrder := true;
1 u& c. W+ S4 T1 v; J end;( O9 D+ T: g& l) j
end;: R- r/ ~- {* D- ~8 W" W3 u& \
end; -- of the method
7 K9 h7 t5 t7 [( x6 C6 e- ^# P; }8 T& c |