/* called by: entrance ctrl of the object 'track'. G5 Z1 J9 s4 s C6 b' B) w+ J! p
*/
' I" ~; }2 D& N$ Jis
% H; x* N* M$ _8 u& l) [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 _ M1 m/ F' }/ N4 V5 E5 r$ pdo
, \( f$ i' f3 r. t Lan := rootfolder.Internal.Tools.AOLlanguage;% @% t" @+ Q& \% N; q
if current = @.Destination -- else return- F7 [- N8 m' X: F: W1 I2 Z9 [
then" S: I; D+ E, x9 A; z4 ?
@.Destination := void;
2 x$ s. ^3 N* ?. t if @.occupied then- J$ ~8 \+ i0 ^$ W8 L; p& P5 V7 Y
part := @.cont;) J; @8 G2 U, y7 P7 L1 j _
@.transpOrder := void;
: I) z2 W3 p* s# K6 G3 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 c+ p- B& W8 D9 O) b6 W8 F
@,root.eventcontroller.simTime);! T7 c6 }. X; Q% G% [
@.HasOrder := false;
2 Q$ u7 l% x! K' _9 m* x; f' P @.DrivingHome := true;
6 o% s- R! ?3 N2 z8 } ? s- d rgManager.tryToStartTransOrder;) ?2 P1 A- N/ R1 }! D) @8 O
if @.Destination = void
( L. f# c* r- Q. ~$ E! _* y& u then -- no transport order for vehicle @
: y. t, F/ h, }% M) a) C7 b \ @.Destination :=' l- ~3 I" n3 }. T5 D& ~
rgManager.nearestFreeStation(@,track.~);
; e* Q4 x1 ^3 f& v2 t newDirection(@);
) P4 C" S5 D4 l* |. i! H if @.Destination /= void then
, y3 l- K! e; q @.Destination.NumReservation :=6 f2 N8 f* A% u! Z& r3 f
@.Destination.NumReservation + 1;+ Q3 a3 z7 c* p) _. R3 [* z
end;# [( e$ p' a2 ]2 Q' H# ?4 y% i' h
@.CurrIcon := "drivingHome";
8 N) v3 R$ z0 I0 l9 {! T @.DrivingHome := true;
2 E- x: _" l# `8 I [$ m) L end;! z. U' G* }. Q$ h) j" s" _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station Q$ y& j" P+ Q# c" G( a+ s
part := @.transpOrder;
2 X% o4 J' N- s9 |9 i0 d2 e- f part.move(@);-- load part
# r& Q" D/ b% e S+ t" ] @.CurrIcon := "load";
) p2 ~! [, F5 |# c GlobalDistObj := part.globDestination;
0 q% v' d8 Z* Z0 b# {. V8 C% L) H assignLObj := rgmanager.rgAssignL;
# r/ o3 W' Y, |7 C1 U, ? row := assignLObj.getRowNo(GlobalDistObj);
, V5 ^6 H7 x& Y5 \ if Row = -1 then -- since 70+ |5 ^. h, n0 R& p0 E
if lan=1 then
- Z/ `% D. ?1 v! S, i2 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 X, N3 w' {, j% y
to_str("in der Andockstation: \"",?.~.name,"\""));
; P3 e! ?1 m/ H else
( G1 R; E% `2 S$ |; x; A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, q/ u3 o; e+ L# R to_str("in docking station: \"",?.~.name,"\""));
9 I; j9 G* i. _, c+ b: A/ r! h end;1 `7 D4 \ r% c9 Q" x3 ^: n _/ X
else
! K8 ?% s$ g8 N" v @.Destination := assignLObj[1,row];8 N, P! v7 W$ ?) x) I6 F
end;
9 `& a, a3 `7 Z6 K0 I# B D. K newDirection(@);. S3 D9 ~4 }+ y7 Y+ B
@.HasOrder := true;
9 V! {' G( ~' ^' ~ end;
0 J9 g% J/ c B7 X) U9 V3 J end;
9 m# ? R3 i+ ]" `end; -- of the method' A i5 e) d; F o0 y4 x5 r
|