/* called by: entrance ctrl of the object 'track'
7 f3 F& a, h& S*/
/ M+ j8 ]0 N1 Jis' R2 |( H4 q# _7 r# h0 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ a! X+ c- c5 \; U: odo
: ~# }; y" a& l. j& r* R! F( v1 F Lan := rootfolder.Internal.Tools.AOLlanguage;
& _1 k5 a( g' Z/ a4 O if current = @.Destination -- else return' ]7 L9 o. F* T8 C/ d
then
$ u9 x {- t" n9 P6 L' F+ u @.Destination := void;
9 @6 v N( Q; M6 N1 x& a, W) r* Y if @.occupied then
1 {2 G% a% R2 u+ U2 |! a; Q part := @.cont;
* P6 d7 C$ R$ |* M! h, ^ @.transpOrder := void;
, a% C' m/ g8 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* i. E% R0 G* G7 K, \; i$ ^1 e) x
@,root.eventcontroller.simTime);% k( |- k4 M8 m! W
@.HasOrder := false;
" |6 j* ?! A7 t @.DrivingHome := true;4 E( o% [) f O+ v8 E* I% D
rgManager.tryToStartTransOrder;. Q! z. B5 H) J
if @.Destination = void5 D, |& S3 v) @* c7 b# v
then -- no transport order for vehicle @4 i# Z: G+ T' X
@.Destination :=' l( U$ V& O& `4 i3 j5 Q6 J+ u5 t. s
rgManager.nearestFreeStation(@,track.~);, [2 R# `- r$ a( |% N
newDirection(@);
6 @; q0 ~; X# ` if @.Destination /= void then1 `2 m4 v9 g& w8 `
@.Destination.NumReservation :=
- W: x3 |& _" B& x; q' |0 ]4 w3 d @.Destination.NumReservation + 1;
) g* ?# W8 U1 B- K I& ~ end;
8 V; p5 O/ f2 Y2 K# c& ~: O: p @.CurrIcon := "drivingHome";
, m4 ]3 f" }1 ?" H, t @.DrivingHome := true;" m3 G$ \, A0 F8 T0 D4 a
end;* D. t9 y( k# |% D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 t0 e4 u M" R3 t# k part := @.transpOrder;
& H0 `% k k( A part.move(@);-- load part8 \4 S! {) g* j; T$ N: r5 ^$ i
@.CurrIcon := "load";
9 i2 Y# O- K* f& x' ]1 r6 c GlobalDistObj := part.globDestination;7 \4 t4 C# t3 b0 m
assignLObj := rgmanager.rgAssignL;6 l; P$ @/ R: g- t# g
row := assignLObj.getRowNo(GlobalDistObj);
! [/ m6 X( d2 ]% ? [ if Row = -1 then -- since 70
4 j8 n3 _8 R c& L! Z* A5 i5 | if lan=1 then0 S1 x, N2 R! _/ A/ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' v3 {( D+ t. f" _- r% l
to_str("in der Andockstation: \"",?.~.name,"\""));, |$ W% I$ k4 }2 K
else8 |2 a5 Y) M- V& @+ D( j4 O- q8 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 P1 ]4 L6 I" ?! h; k: m- g to_str("in docking station: \"",?.~.name,"\"")); 2 q0 i: c6 `9 W' I
end;) S0 m P/ `" w. R& D; _7 G Q
else6 i# \ ^0 _/ _# B6 i# q
@.Destination := assignLObj[1,row];
$ D0 z* W/ x, _8 L end; ' k: h% B! a9 I' }; \' H R7 \$ G
newDirection(@);$ \6 `5 i3 ~, o% j- C4 P; Y* l
@.HasOrder := true;" A3 z) O3 D" a" a8 _
end;! e6 n& Z4 S* {5 j+ y
end;
% m( c* u+ o* T: v& E9 |9 M+ Vend; -- of the method" i7 h5 c3 O+ c; [! v
|