/* called by: entrance ctrl of the object 'track'
( \6 f# E' I) B" H3 q( c9 Q*/
3 ?6 a- z) u5 g: K# Nis
8 _: E5 v4 P9 X2 E, W6 o* h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ g7 k/ F/ e, d% t) Tdo8 V: u, j! Y% i; d3 \9 V5 N2 u, i
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 R7 U# o5 M5 A; C7 Z' M: b if current = @.Destination -- else return
$ q2 u) ]8 `: ?5 P! P5 b then
+ f7 `" e5 I$ c. i" f/ z8 j/ L @.Destination := void;
6 j& I( p* }( r5 ~2 g! f if @.occupied then
* p) G9 [! S9 I5 N K$ @, N% ^ part := @.cont;% u3 U& V$ K- h1 A6 w- r
@.transpOrder := void;: E# G9 S, G# a q3 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ q" q+ H s8 I+ s! L* Z9 f
@,root.eventcontroller.simTime);$ S, w' [5 x" p- `3 f$ t3 C+ r- _
@.HasOrder := false;7 @4 \3 `5 v; F9 _/ m& `1 L/ Q8 q
@.DrivingHome := true;
0 L9 K+ l+ j1 C8 t7 Z0 w rgManager.tryToStartTransOrder;
# O$ R; Z7 M4 D8 d& m, i- ^; r if @.Destination = void
0 L0 g( ?! [* X# Y2 P then -- no transport order for vehicle @: ?6 r: E7 D. v1 h$ g; k- a# }
@.Destination :=
5 t6 \1 Y) u: G& F rgManager.nearestFreeStation(@,track.~);
: P$ ^$ k& ]- v5 l- x0 P5 E, z newDirection(@);
$ D9 l0 H7 s8 J if @.Destination /= void then4 F6 f, ^" W ?5 H4 a' ]5 m( w6 g
@.Destination.NumReservation :=
) U9 _" f- Z X' j+ y @.Destination.NumReservation + 1;8 }" t1 R: S5 c+ N( C4 b
end;
$ `& H: g0 N0 d8 l# m; K @.CurrIcon := "drivingHome";! L' l0 y6 _& H( E+ K6 o; k' x; f
@.DrivingHome := true;, r. p: c: V) p: y7 J$ Q% `
end;) d* \& g7 r' L" C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) {; I! s8 }2 i+ y0 f% x. C1 J
part := @.transpOrder;
" h: l. P B0 h/ O part.move(@);-- load part( @) }! B+ \/ p0 c0 R. p; p# }
@.CurrIcon := "load";
: n7 K* G& d) k( B. q0 i8 Q GlobalDistObj := part.globDestination;
: {, Q6 K4 y8 L+ l assignLObj := rgmanager.rgAssignL;) L7 j( T- D& y7 A) K7 K6 R! |6 |
row := assignLObj.getRowNo(GlobalDistObj);% Z1 V% n7 Y" w _
if Row = -1 then -- since 70
8 W' s4 m" i! j' I6 U: ` if lan=1 then
7 V# _5 e. `9 A. H0 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' k) k7 H9 J5 a J to_str("in der Andockstation: \"",?.~.name,"\""));" ^/ K* e$ f- `- ]' m
else9 D5 @# M* g4 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 j) U4 V, t+ J7 t& v" r1 |! ?
to_str("in docking station: \"",?.~.name,"\""));
! y; H' k0 @/ v end;
: m' d! T9 w* H X4 b# ` else1 `' |' r5 M3 `2 c# U4 W. m% b
@.Destination := assignLObj[1,row];
- b" v: e1 }/ a: |1 q end;
9 k4 b" _) |2 K newDirection(@);
! S/ g- {7 T8 n @.HasOrder := true;
* ?4 j1 d$ l$ i3 w+ i end;& H+ k& j }0 u. R1 A
end;# @8 l5 `6 S- _$ r
end; -- of the method
! ~# F" E: ? J3 U2 i |