/* called by: entrance ctrl of the object 'track'$ d4 ~' f Y d. ~
*// p5 m3 j# F- m) G" I
is5 D$ u! X0 x! L8 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! h& @- _* |& L/ S4 k9 K' z
do
6 _5 F1 [/ z8 Y! V+ k1 p! A Lan := rootfolder.Internal.Tools.AOLlanguage;+ A9 i' e4 |9 s, W
if current = @.Destination -- else return
' F& I3 d3 |7 X5 B then
) `4 a4 ^& B. b8 o: [1 x @.Destination := void;
' I$ E7 \3 M7 [% n( n' V( W if @.occupied then/ y& m9 F; n" ]8 Q: z5 H9 k- T! O- v' ?
part := @.cont;
4 W: z0 T( O9 {( j) e' G @.transpOrder := void;
' g& {( f# x2 b1 O$ Y1 F& K, E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," H/ S7 Y& Z' f$ `$ [1 o* j" J
@,root.eventcontroller.simTime);, ]; R: f' L' y8 }( ~
@.HasOrder := false;5 B6 [& o, ]" ?0 K
@.DrivingHome := true;
* W& d7 P% M. }9 M rgManager.tryToStartTransOrder;$ n: z# m! D2 i5 D+ h
if @.Destination = void
8 ^$ Z1 o7 I$ Q then -- no transport order for vehicle @" T/ c5 j8 q8 m
@.Destination :=
7 B' r; y/ \# U {# V* n8 Y3 R rgManager.nearestFreeStation(@,track.~);% T, S$ T0 S$ v0 i
newDirection(@);
$ ^, I# B+ o; U8 W D8 l( y3 i if @.Destination /= void then1 Z$ \2 X) ]" O9 s5 E
@.Destination.NumReservation :=! O7 y4 D/ H7 r) r% w
@.Destination.NumReservation + 1;
2 z1 o* F! V0 p# m end;' t7 f! t) q0 o Q$ Z% y5 ~
@.CurrIcon := "drivingHome";& u: F( M8 w3 s) H" u
@.DrivingHome := true;) U' v5 h0 u& ~6 l0 T
end;, [3 F, o: } h5 Z' c3 F3 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ W3 S9 w) f1 K8 q part := @.transpOrder;
?9 b* @$ e1 t part.move(@);-- load part) Y& `5 D ]4 }) C
@.CurrIcon := "load";: m3 n& w- \5 D% x& w" A, I
GlobalDistObj := part.globDestination;
' i$ L0 j1 ~/ [+ @' f- M6 C assignLObj := rgmanager.rgAssignL;$ v/ J( n8 Q) o" G8 O; G
row := assignLObj.getRowNo(GlobalDistObj);
* R6 Q- X7 N) E7 ?- J. Z if Row = -1 then -- since 704 z5 p9 L0 }6 ~0 i; k; y
if lan=1 then
/ p6 {$ @. S3 s- }7 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ @- y6 a4 R" g; E* F1 M: e( S/ b- ]
to_str("in der Andockstation: \"",?.~.name,"\""));; j! r5 o- |" N9 v+ S
else
) g6 T* c# _5 N. d2 @$ E( t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! u( F# W/ ?* W& X5 P. }& d
to_str("in docking station: \"",?.~.name,"\""));
1 r3 \6 P. H z. T$ |7 D end;
2 Z$ [3 f' U; D' f. P4 t+ W else
; z5 _$ C& j) Z# h @.Destination := assignLObj[1,row];& p7 Z o" P1 P) }& Y
end;
8 U2 g% q" v7 ^4 V* O9 k newDirection(@);
+ H9 v" ~$ X2 R: B& t% N% z @.HasOrder := true;8 v& q7 `$ ^- z" ?" O- I3 z) X
end;
8 Q/ K+ Y2 C4 i8 j" Y% F& { end;
" }9 C O, X( U$ aend; -- of the method& M: i) L7 n2 Y7 ^. `* z8 j2 U
|