/* called by: entrance ctrl of the object 'track'
/ [" ^ t7 }$ ?9 q*/
6 s# J a- P$ ]! }is
3 t3 {/ C8 K. y9 h, S; P part, GlobalDistObj, assignLObj:object;row,Lan:integer;% b7 a. y( `& |% B; x
do) l# d( o, \( }! h! u5 E
Lan := rootfolder.Internal.Tools.AOLlanguage;5 J! o% e6 l( t
if current = @.Destination -- else return: z+ o, T' t+ G# `
then5 C0 T5 R" p. S0 g4 a$ s; V! z0 q, o
@.Destination := void;
# m9 ^( D! n3 _ K F& J1 l4 R if @.occupied then
5 |' e* S( ~2 { part := @.cont;
' G$ q, {: _8 Z: J- p! v @.transpOrder := void;& w( \. Q' a7 @" e) Q* F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X) N' T$ u) @7 o @,root.eventcontroller.simTime);
7 O S" z8 o9 J; C0 B. } @.HasOrder := false;' I% k2 d0 P8 d8 C. B9 {1 Y. m
@.DrivingHome := true;
( s) v4 _4 R* Z. J rgManager.tryToStartTransOrder;7 t3 U( ?7 g1 a. n' w, _7 k
if @.Destination = void5 j6 G5 w3 b. R1 C
then -- no transport order for vehicle @0 A/ H) j' g; p+ q
@.Destination :=
$ \3 Q$ l: h( _ D: M9 p: E rgManager.nearestFreeStation(@,track.~);
# s5 m3 U5 s0 l8 N; A! w, ` newDirection(@);
! u9 f9 o P! T' Z5 \( x if @.Destination /= void then+ Q3 R- n/ {& E( u4 ]5 J& |
@.Destination.NumReservation :=
% n2 e T+ Z1 j8 ~6 Q( c @.Destination.NumReservation + 1;
: i: k) @" Y, h4 `4 a end;
8 h& o, P; Q2 M0 ^! v3 T0 ^ @.CurrIcon := "drivingHome";0 y$ _2 T6 R0 c) k" f
@.DrivingHome := true;2 K4 z! g4 P$ B7 g; ]
end;
3 h) H6 s! b- p9 n8 U" X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E, h8 `9 M) k2 x6 w part := @.transpOrder;) ^' r* n& D1 b0 Q; k
part.move(@);-- load part/ ^1 {8 K+ g9 H; x5 m* l
@.CurrIcon := "load";
6 `# z, R, R) F$ s" q" C GlobalDistObj := part.globDestination;
# G3 J( v6 V; K5 r* }/ r3 m assignLObj := rgmanager.rgAssignL;8 E# Q( g \4 N0 h7 Q" f9 d6 u
row := assignLObj.getRowNo(GlobalDistObj);* V; l5 ^/ U# S7 Y
if Row = -1 then -- since 70 b' a' ]( @% m" m% G0 G2 v
if lan=1 then
+ k; @( ~- a" j2 l0 H& J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# W3 v' R- r% [& r) o
to_str("in der Andockstation: \"",?.~.name,"\""));. l% j/ c1 ~5 ?' w: i, y( q- Z
else: x/ a4 ]4 x: q9 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Z9 I3 t7 [& k* V( @( J to_str("in docking station: \"",?.~.name,"\"")); E8 E5 `$ \, ]
end;
* K5 V& l7 e. w else' w5 K: b" l f1 K R# c
@.Destination := assignLObj[1,row];, B6 G* |" k/ X
end; ' g. w7 h* c6 K
newDirection(@);
$ G0 @: v; d+ p7 \. a @.HasOrder := true;
/ E( K1 n) i8 n& k3 } end;4 A) R1 |+ ~* k9 b
end;
& W7 e+ T2 W" k" xend; -- of the method
! [1 [3 X% p& F" C |