/* called by: entrance ctrl of the object 'track' W Y$ j8 B' p3 N/ {+ [
*/
4 @; v W" w/ E6 W# mis, }6 I) c! S* l4 O4 X3 o8 y1 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 Z* G& I# `) S
do
2 p6 G2 g- w4 N8 H" E! O% L Lan := rootfolder.Internal.Tools.AOLlanguage;
6 D& j& W% [7 R- J if current = @.Destination -- else return8 t7 V2 r! r- A! m/ E
then
6 u2 L* T) f" R7 T @.Destination := void;
% w* T# s( c* W1 r; X4 K+ A if @.occupied then
% m8 E5 z4 ]: K% H2 g' X part := @.cont;; ?9 h* g V/ w' K; k0 A
@.transpOrder := void;* K, ^# [8 F1 [* p% _1 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ r# G' X( o( A' ?& L8 R" m/ F
@,root.eventcontroller.simTime);
+ w. y" i I0 L! C+ Q( w @.HasOrder := false;
3 c: ?; o) q4 ]1 F% h8 b @.DrivingHome := true;
* R5 L& n! g3 J2 v rgManager.tryToStartTransOrder;
8 n! K& E* x/ f7 r9 ?# k V if @.Destination = void
; t2 }; N8 X' n0 S7 s( l y+ B1 ^ then -- no transport order for vehicle @) Y1 Y0 w5 ~/ M8 l' D
@.Destination :=1 G) L! p/ o% u% k
rgManager.nearestFreeStation(@,track.~);5 {( C8 o1 j/ H% W; Q6 \
newDirection(@);
) D* R" g! X& e! P if @.Destination /= void then. Z& {" \% @# h: E! [, K( H6 }
@.Destination.NumReservation :=
; W9 O. E) A3 T* K: d2 f$ N @.Destination.NumReservation + 1;2 ]; B# k$ [6 O
end;0 c! e8 s3 A2 k- `& Z1 A) t8 y
@.CurrIcon := "drivingHome";6 A( A7 A! U, s9 ]
@.DrivingHome := true;
. E( k! S; V! t T0 B. e# Y end;
$ J& ?' F2 W/ n/ l/ W else -- the vehicle @ is empty, both vehicle and part are in the same dock station! P& q' s$ s3 h* D6 ^4 ~
part := @.transpOrder;1 e! t: ?. Y1 K' ?5 o& p
part.move(@);-- load part
7 k1 _0 F$ W7 H4 X2 }! G) f @.CurrIcon := "load";
% w) V! r; b& |; a) W9 O' V& h% Z GlobalDistObj := part.globDestination;2 a2 \2 {+ t4 a+ K* U6 V, [
assignLObj := rgmanager.rgAssignL;4 q# L8 Y$ s# |8 c
row := assignLObj.getRowNo(GlobalDistObj);
$ k4 e+ F" z; _8 i1 \- G2 D8 q if Row = -1 then -- since 704 |. R4 i7 E& Z" F7 ^8 Z
if lan=1 then
) y3 `! I- }) z% ~$ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 c! V& D9 Z5 P# {8 f
to_str("in der Andockstation: \"",?.~.name,"\""));
# P" @( V% b2 X. `, ?' A else
+ i0 M7 _ o7 ]* \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- T$ u7 t1 v: G |; _ to_str("in docking station: \"",?.~.name,"\"")); 5 Q% S F: P! g9 X% J" _
end;8 v/ p/ @: c9 ^+ l( G+ `4 U& S$ ]& F
else
" _( g* C9 S, u8 w* S. f7 I: ] @.Destination := assignLObj[1,row];1 r8 d6 S9 {4 i. G0 n3 Y
end;
- D# n9 w1 o7 Y; q2 R newDirection(@);
! w6 E. S1 e, o) O! W. _2 w1 ] @.HasOrder := true;( U& F0 C2 A U; Y* E# B& d: e9 B
end;, {6 f/ a, |% H- c [; J
end;5 m: L! T9 s' U- Q8 c
end; -- of the method
6 B; ~, e) q8 J' W/ l |