/* called by: entrance ctrl of the object 'track'
% C+ c7 ]0 J8 F9 z- T- I*/
- R0 u6 ~- b$ ?# sis8 `- S s: C' L: V. A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 p+ q0 G2 a. m X# N9 O' g; E
do
) o* T+ d4 u) Y/ |# \1 k% [1 }( p Lan := rootfolder.Internal.Tools.AOLlanguage;
/ u& s+ u! O) F) U" l if current = @.Destination -- else return
* T {7 o, p" j J/ i3 v5 J# X then, ?1 ?+ b8 q" o5 }, h5 F+ m
@.Destination := void;; U- P+ e* t0 l+ g. a( L7 O( |8 J
if @.occupied then# m9 t% r$ w" `" Q! u: n) _
part := @.cont;
# D- B% f' A/ v$ v* Q @.transpOrder := void;2 Q- g7 B* n$ t6 n3 |+ [* l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 o: I' r- S5 S" f; e* y8 ]; s9 H3 B @,root.eventcontroller.simTime);$ z8 g; V3 j% S4 l% d( f2 x& T
@.HasOrder := false;( r- {; H6 Y! S9 F
@.DrivingHome := true;
; c4 b! P- p& e' x% ~2 }8 K9 ^ rgManager.tryToStartTransOrder;' F) n [* y( j$ ?: W
if @.Destination = void
v5 C! Z4 y0 F4 ?! {7 J then -- no transport order for vehicle @
: I8 E5 @# v3 G8 @, `. j1 q @.Destination :=
6 g, t1 q* D+ m3 h' D; @ [ rgManager.nearestFreeStation(@,track.~);
2 |9 H; q: `+ Y newDirection(@); 1 S3 c* g2 ~' P5 c4 m
if @.Destination /= void then
$ c. B1 |9 r) v @.Destination.NumReservation :=+ O) F1 g( {% g' ^
@.Destination.NumReservation + 1; O9 ~# l8 Y3 p0 J7 L
end;
k4 c! V# X) z' P: @ @.CurrIcon := "drivingHome";" b5 x0 {: B7 R
@.DrivingHome := true;
3 I9 L" f- N; J. d* P w end;+ l8 W0 ~0 J2 {7 Q% A! ^4 T7 ^# i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
l- p" K8 o) o. Q1 `9 b part := @.transpOrder;
. X& v3 P, _& o9 Y9 v part.move(@);-- load part1 S) l: C6 c& z6 ?' i5 G6 T
@.CurrIcon := "load";% ^& C1 Z# J N
GlobalDistObj := part.globDestination;
6 h: B# V4 c6 I! x. m assignLObj := rgmanager.rgAssignL;
0 m! B K! F% V& t% ~" C( w row := assignLObj.getRowNo(GlobalDistObj);
/ ^. n( C6 q1 y/ Q+ a" _: A if Row = -1 then -- since 700 [6 F3 Q$ E+ i9 ~1 P% W% C/ x
if lan=1 then/ ]& }( U" y) \) b, a1 H2 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& y9 Q: S9 I9 H+ |3 H: {4 @ to_str("in der Andockstation: \"",?.~.name,"\""));$ T& A- [% [- W ^, v
else# B; @/ X Y6 ]" p. E4 `- G0 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* K' }, e* |- K! j( t$ [- V, u
to_str("in docking station: \"",?.~.name,"\"")); ( G A+ F; v, Z
end;3 y4 u, M" Q' T% R
else8 `) ?6 A+ ?/ b/ z3 n% t7 D; ]9 Q& { u
@.Destination := assignLObj[1,row];
/ z2 C) z* ?" C a( v2 P# X end; - L% I# w, O& t3 @$ _1 r
newDirection(@);
& \6 R V# n0 n5 m/ A; w* f+ ^ @.HasOrder := true;
) P5 f( W- n& Y6 H: s end;* [5 M5 W6 P* ~$ {' r9 k' B' ]
end;
4 o1 t. w3 h. Kend; -- of the method
# N5 T9 v8 S& ~# U$ L. f# S! ? |