/* called by: entrance ctrl of the object 'track'
+ A9 ~4 `5 T" E# U% i*/' j) j# Y+ W( w) |; a2 P
is
/ v8 S# N9 i) {4 \/ o$ d. S part, GlobalDistObj, assignLObj:object;row,Lan:integer;% E2 c/ ^# h4 Q! o: Q. `$ V
do- g6 u5 f* S7 z- p) d @
Lan := rootfolder.Internal.Tools.AOLlanguage;
! k1 T' P+ @0 }- F( z if current = @.Destination -- else return/ w+ V2 H+ k% a# I/ n
then
! b0 \1 m9 G6 m7 k @.Destination := void;
, I+ l# ?9 z; J3 } if @.occupied then
6 Y5 v6 m; E& I7 Y part := @.cont;$ u. O1 R; e4 S9 }1 u. z
@.transpOrder := void;
) Q9 R8 |4 o' V+ Y* J) G' |0 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 V, P9 C- L1 }) v6 j# i# W @,root.eventcontroller.simTime);9 Y5 i {; a. E, k& E$ ~# G2 w& E0 H
@.HasOrder := false;
9 i8 I! Q, V! n. W @.DrivingHome := true;
* r0 K4 v, j( K+ j rgManager.tryToStartTransOrder;8 d* s+ \( ~! [' J8 Q
if @.Destination = void
# U1 d5 `0 c7 t4 \ then -- no transport order for vehicle @
: ?. Z+ r# Q# L8 @: W; Z2 a" Y @.Destination :=
2 V, M" t# K3 j( u, I6 |- @ rgManager.nearestFreeStation(@,track.~);
2 W0 g9 @; D' \0 U newDirection(@); " L2 t* }' p! F. v0 `* [- w
if @.Destination /= void then }# d7 C( I0 R5 o) W9 t' X
@.Destination.NumReservation :=$ e- `$ {6 ] P: @! A' \0 n' P+ `, @. v
@.Destination.NumReservation + 1;
, Z8 ]0 l4 ]4 W) |% t end;! L2 F1 D/ W* h+ @
@.CurrIcon := "drivingHome";0 v. [+ U) c5 R0 l B: ^
@.DrivingHome := true;) |4 f) Z6 `5 x }
end;8 O; |/ F. o# X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) G0 U: U; q+ [# n part := @.transpOrder;
8 g4 {: y' ` \" _2 D/ @ part.move(@);-- load part
2 x; U% t, d C( Y. j @.CurrIcon := "load";
0 Q; w3 V0 T) k GlobalDistObj := part.globDestination;
! e# V+ l8 r; ` y4 G5 R/ h, H& Y; q assignLObj := rgmanager.rgAssignL;1 o! d ^- W- L+ j8 q( g
row := assignLObj.getRowNo(GlobalDistObj);; g ]3 j) `/ k0 j# b+ M7 K ]
if Row = -1 then -- since 70; v5 z) y' z2 f, Y
if lan=1 then
; J9 c3 k$ e4 l m: n! V# O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
D7 f# v. M j4 u to_str("in der Andockstation: \"",?.~.name,"\""));
- `2 Q) |! P- U. R( } A else1 T5 Q8 N2 A$ Z0 G: o* d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 Y' D7 r+ N* x* p% ~1 G4 T; Y
to_str("in docking station: \"",?.~.name,"\""));
4 @$ u- y ?$ Q* n0 K# G end;1 \+ C( x }7 _
else1 t' q6 Y; m* s, ^4 A
@.Destination := assignLObj[1,row];- u8 s6 {8 U' b& r# z2 \
end; ) a* w/ A9 U& W3 V9 I% d/ s5 [2 d1 D
newDirection(@);
8 N% }# \4 b' g s1 l, t @.HasOrder := true;) y3 j% T; C- _* }
end;- W; @3 k" k& ~ s
end;. f2 x! _8 l" C4 i. S0 v
end; -- of the method2 L4 P* P+ i7 `3 x! y
|