/* called by: entrance ctrl of the object 'track'
/ o$ o+ \8 V8 k/ C2 \5 N- L* S" Z*/1 o0 I- q. g& }, ?$ z! A: @ r2 |$ ^
is
# o9 m& a) n+ k$ _) _. q part, GlobalDistObj, assignLObj:object;row,Lan:integer;' V$ b* `" Z% k) a# z" ^* E( G% V
do4 q [' d9 K9 Y6 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
. p4 K3 H0 \( J$ h2 z& p2 V7 Y1 ~# ` if current = @.Destination -- else return( O3 v9 K- s. Q5 _% A# O4 l8 i5 d" {
then
* l E, a- p) q9 ]: N @.Destination := void;
5 S: f' d& g7 ?2 U$ D if @.occupied then
" L, {' ?2 X$ O/ i( y part := @.cont;6 n0 N: |& Q% \
@.transpOrder := void;) Y% I+ X# J4 {- v3 Q# X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 m9 ^2 H5 r& W8 e% _& w n5 s5 o$ B
@,root.eventcontroller.simTime);
7 v0 ^$ \4 a% L5 n5 f J7 `9 A @.HasOrder := false;+ k Z5 z2 R$ k! e- c) p- Z0 }
@.DrivingHome := true;9 i2 C8 P- ^2 o! |1 t" i
rgManager.tryToStartTransOrder;
2 z a4 x+ }/ K/ F1 F3 ^% z if @.Destination = void7 P: E6 F: a1 g1 x; a4 m+ z
then -- no transport order for vehicle @
* k% k% a, W; m& T6 }; l5 K7 d @.Destination :=9 Q9 u. R% X% X2 i+ o5 V) E
rgManager.nearestFreeStation(@,track.~);
9 Y% w/ U! c! y/ I: x& d+ R' M newDirection(@);
6 E1 V5 o1 a( _. X1 L if @.Destination /= void then
* ?' R" z/ i; r/ n+ Y @.Destination.NumReservation :=
/ Y& H; R7 `' g; F7 ] Y$ ?/ ~( d @.Destination.NumReservation + 1;
, M) _) z' s6 C8 U, i0 `7 T# H end;
2 Y2 M' ~0 L4 [( e3 u, c @.CurrIcon := "drivingHome";
4 o0 u* {- M* ^$ v: N' n @.DrivingHome := true;
0 t5 l9 _9 J2 h" q5 ^ end;: k) D) U' V4 N( z/ p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e& q; e& F% H8 ] part := @.transpOrder;8 u* I. z, C8 @6 O
part.move(@);-- load part% K5 m6 a& a L* c I* ~: o
@.CurrIcon := "load";
8 x4 @* B" g2 I/ @: a8 I) Q8 E' ] GlobalDistObj := part.globDestination;3 j; {. N4 {- e* b
assignLObj := rgmanager.rgAssignL;
) G7 |7 M' i% f row := assignLObj.getRowNo(GlobalDistObj);& Y7 k, Z2 y6 g. d9 q0 y4 X
if Row = -1 then -- since 70
' ~7 m( c3 ^2 p, Z if lan=1 then7 X- Z, ~5 O/ r& S; o6 F {* q2 f+ L; |& Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* v' {( D: E; X% G+ O& {
to_str("in der Andockstation: \"",?.~.name,"\""));
+ S0 J v( Z. s8 K- j- d( s else6 s3 ~4 c4 S" @* a8 V+ _1 H: g9 |# @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 w6 f( I- F, W# {5 N8 y* ~0 m to_str("in docking station: \"",?.~.name,"\"")); 5 |; X1 j% V1 H3 v0 ?6 Z$ o4 W) `
end;
$ {1 F7 `* Z. k) _/ F6 b6 u$ f else x* q% R% ?+ N9 k
@.Destination := assignLObj[1,row];# S+ R3 E# o6 D# j6 J
end; ! q) H9 X4 p' _- i3 G0 |( a0 ?
newDirection(@);, |: N4 A1 ^$ K) ?; U T3 g
@.HasOrder := true;
" S" W. i' p) f3 X Z8 e. b end;$ P5 A7 [# w, _* F& v1 [3 o. j) f
end;
" `% s( U; i6 x' N7 Vend; -- of the method6 m% U2 e# j n$ x6 x
|