/* called by: entrance ctrl of the object 'track'( P4 t. C9 k0 L% d" ^3 h8 I
*/
7 S8 e) d% P; L3 ~/ B: l1 xis% m9 o9 L- M5 M8 s- L3 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 E* G4 Z: a6 H9 k% r
do
$ r6 {4 B: F$ ~* a9 Y5 s- ` Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e9 V2 ^6 n. C" c' t0 X: y3 X, x if current = @.Destination -- else return2 n! {0 D4 {% ^. Z
then
1 q9 b& }1 v W @.Destination := void;
' v5 S; e/ q; U1 i2 {' q1 Z3 A$ N if @.occupied then
5 }8 m5 |) k" G& j, ^8 M0 @% R( f* K part := @.cont;/ {* x8 ~! ], ~ ]% _/ v8 _
@.transpOrder := void;+ |$ E9 ^* z5 c' g$ M$ m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) ~( c3 q; p* x6 e$ a' b9 D
@,root.eventcontroller.simTime);# o; Z+ E; E# p3 R. _. I7 F1 V
@.HasOrder := false;
: ~8 U0 R E; j+ t- r: {% G @.DrivingHome := true;
/ ]: H, G+ P ]' E rgManager.tryToStartTransOrder;9 ^" {% f9 \. `' L2 R! m
if @.Destination = void( H# i4 V( Q1 Q
then -- no transport order for vehicle @( \$ o G( s( U. |; o" a
@.Destination :=
! E- C8 Y, z/ v4 A$ b) a) y rgManager.nearestFreeStation(@,track.~); Q) J: }( o' w; h
newDirection(@); , R _2 o9 D3 a q9 H
if @.Destination /= void then, n' f: e, y, I- P& Y( U2 v- ^
@.Destination.NumReservation :=) r. D5 d% m2 W7 n: U" N
@.Destination.NumReservation + 1;
- {$ W% u6 i/ A$ j) Q' w/ T end;
5 F5 S1 X2 z5 r4 n* j @.CurrIcon := "drivingHome";5 w5 t! b+ e6 J% f
@.DrivingHome := true;7 x/ g" t- l! W) h1 F
end;
' j$ }$ ?+ T1 }& |/ ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 z) W- F$ a: y- z1 T1 \
part := @.transpOrder;
) V* ~! r- b' z$ Z2 l part.move(@);-- load part
$ u# k0 T, ?! _7 c: o @.CurrIcon := "load";
# P2 d M: |4 Y, w GlobalDistObj := part.globDestination;; I- _+ J- V$ l% b: S8 s
assignLObj := rgmanager.rgAssignL;
$ X( k1 x, C* r* R6 @, ?% | row := assignLObj.getRowNo(GlobalDistObj);% k5 W2 x4 D- a$ T/ M! P, A0 l
if Row = -1 then -- since 70' i2 Z4 j3 I X
if lan=1 then
z: J# r ^* c6 Y4 X) @9 [1 ?6 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 x- \$ J- L! { to_str("in der Andockstation: \"",?.~.name,"\""));
7 G% p. _% ]6 h else9 {! X7 s2 ]) S' e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ w* [3 \7 z" x1 {6 r to_str("in docking station: \"",?.~.name,"\"")); % I8 j7 G6 p2 Q6 T3 { F* S
end;% P1 n/ N3 O" q* R0 I; y
else" ]) m& [- z; i5 Z
@.Destination := assignLObj[1,row];
q6 T3 e% d) X M end; 8 c+ X9 r; _9 s' [
newDirection(@);
* P4 R7 D+ Q. B [9 h6 O3 s) |# H, K @.HasOrder := true;/ O% Y ^9 j+ c, W: Y7 @
end;$ y+ B" l! F+ J# @, v/ `
end;# Y" f+ i- v" u% H0 h, c, p
end; -- of the method
' q0 \% t7 f; m, o |