/* called by: entrance ctrl of the object 'track'+ z9 q/ E R- S; V5 N6 N0 p
*/
+ U0 h6 Z/ O) u2 Nis
6 j2 E" Q8 A: I5 ?- T& q part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 V# b$ H8 E( |# U2 U) g! W
do
' p n6 ? ?( |! [1 q Lan := rootfolder.Internal.Tools.AOLlanguage;
* F1 v1 l1 |) ~6 A \5 C if current = @.Destination -- else return6 C& E7 q% O; e( e5 w3 j$ q
then4 w; y* S+ k+ ?1 n
@.Destination := void;
; t8 l, l. F1 W if @.occupied then
X3 D0 O" v; u- j7 Y) M part := @.cont;
6 j; L; k- T, c6 e- B @.transpOrder := void;
[( r; g. s2 A' T' Q& R" V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- p2 J- P2 j5 g8 r' t& D2 D @,root.eventcontroller.simTime);
' b2 J6 {2 X7 K. k @.HasOrder := false;5 Q( ?, E" V) ~2 F$ G- q
@.DrivingHome := true;4 L# ~) w& g$ p5 \
rgManager.tryToStartTransOrder;
2 h- n$ A& t+ o( l& D3 `: b if @.Destination = void
! ?. u2 H, l0 Z ]2 R! [ then -- no transport order for vehicle @6 k8 j. K' ^( g" i
@.Destination :=
& z8 y, @9 r; q# z rgManager.nearestFreeStation(@,track.~);
- J2 Q' m3 b: O) d" ]3 ? newDirection(@); 9 g# Y4 n9 N0 n- H) l& y$ l
if @.Destination /= void then9 a3 u2 `1 m; P9 a1 I+ k. {5 J
@.Destination.NumReservation :=! w: v$ H+ Y1 ]0 ?' Z' t/ Z7 h" ^
@.Destination.NumReservation + 1;' I7 U7 _2 m' r
end; p9 A: u- x, Z/ J
@.CurrIcon := "drivingHome";
# z* n! a1 V' m) X4 ] @.DrivingHome := true; X' m4 ^( W# v# {$ w# h
end;
" B" Z1 r6 y7 S3 R9 P4 `4 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 K- G' W4 K: s/ S# R: k; l% Z
part := @.transpOrder;) J7 _* x0 y! s/ W: ~2 w- {# d
part.move(@);-- load part
- m R8 L0 d9 F- ?8 y+ M @.CurrIcon := "load";
c: U' E) |% o! z GlobalDistObj := part.globDestination;0 P& C4 u N( V% H
assignLObj := rgmanager.rgAssignL;
* Z- k" c H- A* o$ [ row := assignLObj.getRowNo(GlobalDistObj);
5 b$ A' H5 i7 z- N( h if Row = -1 then -- since 70- v" V8 p# S( | u" c; t
if lan=1 then
! w: t8 s+ J. [# a9 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 T2 N3 ~9 V6 B7 r f+ @9 A! b0 K
to_str("in der Andockstation: \"",?.~.name,"\""));
- r# | R F+ ]6 M K8 R' I5 m/ } else
; X( O1 S- |, c1 Y0 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
H3 v3 G1 O C0 { to_str("in docking station: \"",?.~.name,"\"")); # [- z# H9 d0 N7 m% J
end;
- a/ M5 _$ U+ B1 W* ~ else3 U. Z0 ~& }; I9 a6 X) m* _
@.Destination := assignLObj[1,row];
# n1 _2 G8 K0 Q' T# Q, | end; . M% \& T7 n3 Y2 K! _
newDirection(@);
Z- q9 |( |# L& \, A2 G! J @.HasOrder := true;
8 A4 p; e$ h5 V+ e8 k9 x' C9 f0 U end;
2 A. E3 H* v6 Y6 A6 d end;) w" x" `9 O8 _& L
end; -- of the method& v, ~$ a7 L/ j5 |( {: B6 i Q
|