/* called by: entrance ctrl of the object 'track'
0 i- y7 O( v- w8 I0 {*/7 \4 F9 O+ h- c& h4 r, R# J5 \
is/ }4 b9 p" C% h& o2 V( P+ \3 }9 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" P: r Y; D, f' G6 m0 L# Qdo
! X5 s! R" H8 ?! e Lan := rootfolder.Internal.Tools.AOLlanguage;
$ u6 s' w( q! k) V2 {- } if current = @.Destination -- else return8 O5 B/ L4 N! Y% @1 X/ D
then
% y* j% X7 u! }: M @.Destination := void;
u7 k! |8 }' a8 T- G if @.occupied then
& [2 Y$ c# r8 U part := @.cont;
& V, u4 h# p: K! G! x, Y, _ @.transpOrder := void;! i2 D% f+ f* X+ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Q8 \% y6 c" o- l# r
@,root.eventcontroller.simTime);
4 K1 Q9 r: X& x7 S; s @.HasOrder := false;8 J4 _, B& A3 c6 R
@.DrivingHome := true;# m3 \; J r1 b# |2 t, n9 i
rgManager.tryToStartTransOrder;
# x" c4 b* N* k" \ if @.Destination = void3 C( M) r8 f- Q7 c, m
then -- no transport order for vehicle @
9 E. G! y+ c+ V' r) i/ L* _' ? @.Destination :=
3 }2 V# r6 S/ U, [ rgManager.nearestFreeStation(@,track.~);
9 {- h6 ]" q* H# }: Y newDirection(@);
1 [* w, C) g- z H! x if @.Destination /= void then
3 S0 N1 ]5 Z& I3 O @.Destination.NumReservation :=
# X: z% U3 ^' j Y T @.Destination.NumReservation + 1; \0 f$ A1 |7 R% ^) M: g( d
end;
; i" f8 t2 I1 ^/ m @.CurrIcon := "drivingHome";/ ?9 N* q# P" f& j$ [
@.DrivingHome := true;
+ ?! c! V; B& h$ z3 @ end;" M( k# o: o- @% J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* T3 a* M, x' d' s part := @.transpOrder;
9 w. Q3 _4 t1 b7 Q" y, c, I9 X* R part.move(@);-- load part) Q( n8 e& o2 c9 z
@.CurrIcon := "load";" v7 A$ r* \( `! C* x
GlobalDistObj := part.globDestination;' j0 Q' s! \) e0 F6 j0 S
assignLObj := rgmanager.rgAssignL;* l" R* Q4 V% i7 ?/ p7 k
row := assignLObj.getRowNo(GlobalDistObj);7 W- X, W- w: g3 b
if Row = -1 then -- since 700 }: t+ F$ H7 s/ l% w
if lan=1 then/ @+ p& u0 c5 j; G: Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. V/ {9 ~- U6 d0 A( X to_str("in der Andockstation: \"",?.~.name,"\""));# J, k m% g% s, `3 v4 K1 F
else
! z# D, L% h5 j' v2 ^4 |2 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Q+ k* G" H M$ i0 j# T i
to_str("in docking station: \"",?.~.name,"\""));
$ Q# K% K4 w- g8 N/ x9 t end;/ |/ Q- l1 ~* o0 e0 u% U7 ?9 ?' O s8 R; F
else- P" {. j( B) ]8 W; ]
@.Destination := assignLObj[1,row];1 K. z+ O# V, D# _! ]
end;
3 X, }1 I* |- B3 t* r2 p& t$ Z newDirection(@);; H. g4 c6 o4 ~% M
@.HasOrder := true;6 l0 h. j5 S c0 [9 G- B
end;1 J9 g. V' w# F- q* D5 ~
end;
5 R g# i. r. r% ~, V9 d# G/ V% vend; -- of the method
% y2 c& h% r: x8 A- P |