/* called by: entrance ctrl of the object 'track'
7 p3 p, {1 s# Z- }2 A*/8 l% s2 k# W, @+ C7 `! f
is0 n8 s% B" E& s' R6 N& l2 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 w" X/ b+ z1 J0 X8 Zdo
! V. k4 X( z8 K Lan := rootfolder.Internal.Tools.AOLlanguage;
0 @! R8 X3 X0 v/ I if current = @.Destination -- else return+ O' ^2 w' M' Z3 I W: U
then
2 F, Z% D) D( i1 M! p ]& f; l# D @.Destination := void;
u9 c! q$ C8 C3 X; W# G if @.occupied then
* _% n, J1 z. ^, _3 N) o2 h part := @.cont;9 d9 y* s8 z2 r2 d1 T$ _8 H0 Z
@.transpOrder := void;, F/ R; r5 X5 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. }9 F6 s+ n8 }1 I7 r$ K( F
@,root.eventcontroller.simTime);
# a+ O. P* @* O& { @.HasOrder := false;! B! j# O- t0 h% ^6 Q* W
@.DrivingHome := true;# \' V4 @3 ]* N
rgManager.tryToStartTransOrder;! ~! w% m( i# ^3 R8 g& o
if @.Destination = void* K; B6 Y8 t( w4 i
then -- no transport order for vehicle @
- _) a( Q$ r r$ T$ C6 G0 z @.Destination :=& I0 n3 o* P6 f$ s/ H
rgManager.nearestFreeStation(@,track.~);( Y, y2 ~ S5 f" Y
newDirection(@);
- p( X: w, ]& B1 k# ?! n if @.Destination /= void then8 z) H# o" }" L5 V( v
@.Destination.NumReservation :=8 e; f/ j* a) H! S7 b
@.Destination.NumReservation + 1;
* a9 P0 v! {4 Z" M o$ w; \ end;
4 y% w# f a( Y1 h T# { @.CurrIcon := "drivingHome";
$ c4 b' J) c: t7 u- @ @.DrivingHome := true;
x, X' M" i" c& ^$ ] end;' }( w6 i* m/ `4 l, Y, S: c. u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* S$ }, |* c& o+ S! U) B part := @.transpOrder;
+ I4 k+ @8 N N: G/ D; z8 s part.move(@);-- load part
V% _, U0 r9 B# l: E @.CurrIcon := "load";
# \$ {, k6 u8 E- \; g$ i GlobalDistObj := part.globDestination;
: ^: ?; d4 D+ x) |* c6 V assignLObj := rgmanager.rgAssignL;9 t" ^- N$ Q2 y: k: o
row := assignLObj.getRowNo(GlobalDistObj);8 r$ S4 }/ u7 `: [. x; T. _2 L
if Row = -1 then -- since 70, O0 v: ~6 C" c( J) i; U+ n3 \
if lan=1 then9 f% Y* ?' v( V0 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( Z& h; Y" d8 D6 R- z- O to_str("in der Andockstation: \"",?.~.name,"\""));
" v- ?# t) a0 g8 l* m5 ?$ h! U; q else7 U0 r% s" g J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; i' ?, }$ k: s$ S/ X! z1 k
to_str("in docking station: \"",?.~.name,"\""));
6 D" } S4 }& u8 }1 W; ] J end;
4 |/ C6 Q$ R: m else
! D& s' b1 X& K @.Destination := assignLObj[1,row];/ w7 c$ V3 ^$ ^: r$ l; E9 T7 t- j
end;
* o% z" Y! K: d/ @/ N) |- b- F+ e" ` newDirection(@);
5 B/ K6 h- Z' i/ S4 F @.HasOrder := true;
" G4 p4 u7 ]) R$ }- H( s/ J end;
H! v, d0 a* ]' x8 c end;
$ X4 W% T, n' n* eend; -- of the method! K/ N8 w* `# B5 H4 a8 {( y
|