/* called by: entrance ctrl of the object 'track'
: I* c1 v; |6 o( G- Q) x. {*/0 Z* Q9 }# w" ]4 w% I5 G( Y
is% R# C" y5 L: L2 h- D
part, GlobalDistObj, assignLObj:object;row,Lan:integer; ^* Z" n) m" W* V4 H6 s6 c2 k0 I
do
# ]; F. L, J9 P; ~0 V2 r Lan := rootfolder.Internal.Tools.AOLlanguage;; Z0 t2 k2 E8 E. a# c& u
if current = @.Destination -- else return: l# R( V7 k7 l. x
then
3 B# X1 ^, Y% `9 w1 ^ @.Destination := void;
/ V; c' W9 W6 J+ @: l: n; { if @.occupied then8 U, n4 q& Y: T5 _
part := @.cont;+ k: m7 S i; i. Z& [/ J6 D
@.transpOrder := void;
9 W8 \. W+ f3 F1 k7 y6 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ L9 p* U t0 r% r- n5 I( i' r @,root.eventcontroller.simTime);5 ]5 S5 |( E$ [7 H, e$ j0 |0 }+ F' S7 a
@.HasOrder := false;
1 d/ t, w' g6 @5 {* s @.DrivingHome := true;
9 b4 g' @5 d! k. h! _ `: _2 J/ ^ rgManager.tryToStartTransOrder;
G- V/ G" K2 \. ` Y6 ~4 n if @.Destination = void8 E9 P" U4 T! G- j
then -- no transport order for vehicle @
; B8 |/ P/ V; }' B$ e$ w( p& ? @.Destination :=! Y/ K" {5 u% g
rgManager.nearestFreeStation(@,track.~);8 F* H4 n M% @# h5 S
newDirection(@); j ]$ U q) Z0 E+ Y' E
if @.Destination /= void then5 O7 u, E. \; K1 _9 M
@.Destination.NumReservation :=) u% ]+ @( ?. N- p X
@.Destination.NumReservation + 1;
: i u& D4 m$ \- v4 {$ \ end;
6 S( x( g7 n; Q: G! Z1 e) S% j @.CurrIcon := "drivingHome";
6 W. A l/ |6 n! g8 L7 b$ w @.DrivingHome := true;" z! `4 _, _! _* P$ b
end;/ f; i& `" N9 ^ G/ F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 G. i& w S% H* c9 N: K9 \) I part := @.transpOrder;* r$ w- Y8 |( M; u7 @1 Q# l- R- y
part.move(@);-- load part8 i8 w2 C: _. j& M2 F
@.CurrIcon := "load";
! Q8 A! p& e* x# Y3 t GlobalDistObj := part.globDestination;
! v, u; M$ E' Q1 i+ p- h2 ]4 S assignLObj := rgmanager.rgAssignL;. H9 i' r, `) c8 x
row := assignLObj.getRowNo(GlobalDistObj);
3 A1 W( V8 o9 O4 K; a7 N! Q if Row = -1 then -- since 700 Y5 K" u8 P0 m9 E! ^: R
if lan=1 then1 L5 `- N8 w. _8 [( k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. B3 n( G" ~$ Y to_str("in der Andockstation: \"",?.~.name,"\""));' V* u2 z& ^, G% ~# O8 h
else
. t+ v; y k; R7 y+ J r5 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 K, r* Y: M* E
to_str("in docking station: \"",?.~.name,"\"")); ! t6 |) I( Q) q; |) I- Z
end;/ e& {, q, ]# U2 y
else1 Q) S5 o( P' a9 V! `
@.Destination := assignLObj[1,row];3 F C/ u% y1 S$ e( g' ?, e; \1 U
end;
. V+ y; d% {; ^. X% b" q newDirection(@);7 s+ t \. U/ A- z
@.HasOrder := true;
3 {- v# S2 L% @. ~ end;
6 P: P0 r. I* k$ e" u end;/ ?9 C* [! ]- p$ [
end; -- of the method* k1 J. s9 H) Q4 m
|