/* called by: entrance ctrl of the object 'track'/ Q+ Q' _$ k% U l8 s. V6 f
*/7 l% q: O( B6 a4 `/ T) T
is
* Y) P5 Z# g4 u4 s3 C part, GlobalDistObj, assignLObj:object;row,Lan:integer; V* R) n8 i% @- P& b# p
do
; v- }% U" S# e6 J( n1 i: q Lan := rootfolder.Internal.Tools.AOLlanguage;
* U c5 k( s- n( n if current = @.Destination -- else return5 ~! a$ o2 P* |- [9 m
then3 K; }# x% Q! t$ c6 a4 ?2 i& l
@.Destination := void;! W$ [; W+ Q. @% ~
if @.occupied then8 P3 D8 e' y ^. V8 y, A# R
part := @.cont;
; \* z6 V$ n, A7 v0 m/ O5 n) F8 a) E @.transpOrder := void;
1 \/ b) H' v5 `4 x F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 W) g4 R1 ^6 X$ A3 i4 I
@,root.eventcontroller.simTime);2 k% _ e. ?. z2 o( ? `7 j
@.HasOrder := false;
7 V: q# d0 w' d @.DrivingHome := true;2 G2 o5 |3 f* q; \7 R
rgManager.tryToStartTransOrder;
( i3 O, C' x9 _, I* `0 X if @.Destination = void b2 c3 d* d4 H; `8 o, m I
then -- no transport order for vehicle @
' w) A* w: p( }8 W @.Destination :=: ~4 Y6 M7 f- w( w9 ]3 H6 Y1 t6 }" o
rgManager.nearestFreeStation(@,track.~);
: ~0 K! t# M" t- U% E1 F newDirection(@);
6 B" b% j8 d) P/ k if @.Destination /= void then" f0 ?% C$ D0 G6 v6 @
@.Destination.NumReservation :=
, m" \) `; O' g' V( J @.Destination.NumReservation + 1;- o# r9 g. _' W1 _0 j
end;
! q- b! [) y: l. Q, W8 V+ S @.CurrIcon := "drivingHome";% O( {7 N# A8 `/ C
@.DrivingHome := true;
. I6 \- r4 L; }3 h end;2 w8 ?% O! J) y- f7 J2 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. L# t1 ?/ c' [8 v1 E# h6 E
part := @.transpOrder;3 u4 L5 {# z. v# u2 D* a
part.move(@);-- load part
; L3 Q) M p, _3 a g& n @.CurrIcon := "load";
3 ?4 u: C7 q* z" B& \ GlobalDistObj := part.globDestination;9 ~+ u2 m' ]- o5 N- O: A% J
assignLObj := rgmanager.rgAssignL;
, D; o$ o! z8 _2 |: n2 i, j row := assignLObj.getRowNo(GlobalDistObj);
" g- ]. @% |/ w- Q% ?9 Y if Row = -1 then -- since 70
; d* L0 S$ F7 y* ^# ^* E/ N* t if lan=1 then
8 ^' N; ^3 a3 U; H/ x0 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' x* G9 n+ N& t: L; v to_str("in der Andockstation: \"",?.~.name,"\""));$ d+ v+ `* H5 e( `$ c5 D/ \
else
+ \6 c4 j/ K& d. R6 q5 }* g$ c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! _8 I# i4 q3 j) a" U* G, f2 z, ]: C. A
to_str("in docking station: \"",?.~.name,"\""));
2 l: m/ k3 r1 v6 ^& } end;
0 }8 i3 K7 {4 E9 @" y: |- e. g% L0 c else: ]; I5 |" {; t* L
@.Destination := assignLObj[1,row];$ ?1 V/ a0 l: }+ q
end;
' z% S& L, y- d5 n7 Y1 j newDirection(@);; W# v& Y" T: {. N L. o, z
@.HasOrder := true;! i/ @/ q! j! |' Y$ e5 U# B9 ^
end;3 z" R, u0 r. h8 v; A3 q3 B
end;2 ^+ P, ?7 f1 w1 _0 s( ]
end; -- of the method' @1 U6 f# R) ?8 I, f& e# }. w' y
|