/* called by: entrance ctrl of the object 'track'* v* N8 y' g3 f* E+ D* x
*/
. K O+ c0 u& X" mis
0 m6 C( c) i, A part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 q" r- |0 V+ W
do5 a4 B* v& _8 C1 ]: T. j
Lan := rootfolder.Internal.Tools.AOLlanguage;" p1 Q7 p/ b# Q0 q! R& v
if current = @.Destination -- else return
' o7 a' T, v, O4 |2 I6 |0 \ then1 B: M) T0 N' ~5 }) Y" I
@.Destination := void;
; G: I, e" P' R S if @.occupied then; x+ l" {" V, J4 v
part := @.cont;
( Y6 u v: H% K7 L! {) W @.transpOrder := void;
( K# R) l+ J# f" ?: w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, }- y, F1 I& t) x6 c" b5 X) {" a6 d
@,root.eventcontroller.simTime);
' e! i2 T, t$ N# x' ~ @.HasOrder := false;
8 M$ ^) o7 E" g6 m7 { @.DrivingHome := true;
3 g! E' D$ }/ `+ R* v, C2 d rgManager.tryToStartTransOrder;
2 g4 l3 ]3 b$ B, I if @.Destination = void" F# S2 X: q4 q0 r
then -- no transport order for vehicle @! A) Z. Y, T8 _
@.Destination :=
- L# }2 L% T7 \! a. n; s rgManager.nearestFreeStation(@,track.~);: x# x" \/ x% Q5 V4 n
newDirection(@); ! i E" _" b+ F6 P3 x9 R3 c; O
if @.Destination /= void then
; i' ]! a2 u! Y5 Q) d( X- K+ b @.Destination.NumReservation :=
& }1 K2 o; {# D7 ^ @.Destination.NumReservation + 1;
3 A* e7 T/ g" q. i, o: g j+ z7 m end;. V4 L1 Q0 j7 b4 p2 z! \8 _; s+ w7 i2 X
@.CurrIcon := "drivingHome";' ~/ ~% P3 ?8 W9 z! o1 f
@.DrivingHome := true;- \* Z8 n j+ X G
end;, l8 A$ k9 r# g p/ k4 E7 r4 W, |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ {3 _- r) N8 L% t part := @.transpOrder;
( f+ U: U3 S/ L- ^# }2 D part.move(@);-- load part5 i6 ]' z- Q1 P+ m# w7 M
@.CurrIcon := "load";
8 n) w- p! V+ Z! m5 U5 p9 B& T GlobalDistObj := part.globDestination;
5 n. e5 P: j# G. L8 ^; j3 M assignLObj := rgmanager.rgAssignL;3 z0 H2 q$ e& {2 V- f
row := assignLObj.getRowNo(GlobalDistObj);
' g: g. v G) U$ ~1 c7 b if Row = -1 then -- since 702 N. l A0 x: ]2 H& {/ x
if lan=1 then
& l8 n' v3 r- p( q6 B/ J% x2 ^ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 o, O6 W# E a) R; ~
to_str("in der Andockstation: \"",?.~.name,"\""));: ^" {$ n7 m1 D& ^$ o/ f
else
/ U) g: {( F' G7 _6 C2 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," Q! J5 S6 f1 A( Y9 Q9 I: }' Z
to_str("in docking station: \"",?.~.name,"\"")); . v) }4 W( ^: s9 i
end;+ h) g* R/ {( Y0 G! t# e- n, k6 L
else
' J- G. @6 k4 B7 t @.Destination := assignLObj[1,row];& A( S; A0 T$ \: X. r4 R( q0 B
end; ( v3 c+ j, o6 _& I/ `
newDirection(@);
$ O; |' Q0 @% P4 h) Y0 J @.HasOrder := true;
5 V; Y1 Y8 Y6 H1 L& D" Z* R5 g end;! x, Z& h' p$ w! i. |% o
end;
# D( i7 A. N* V) j. }2 f" c; ^end; -- of the method
$ m6 Q' u. w3 q: Q | |