/* called by: entrance ctrl of the object 'track'3 T! W1 Q' E. R
*/& y2 u' x8 L) y, ]' l3 u5 y/ k
is6 Y) A# ^% u$ B# }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ d) T' ?2 H1 a2 G) T2 ], r
do% _2 C& b H, r8 l
Lan := rootfolder.Internal.Tools.AOLlanguage;3 y. S* Y/ i$ ~+ s' |
if current = @.Destination -- else return# Z7 G9 f" R9 A4 g1 g8 @
then
# U3 U! U5 T. y+ x; X% ^; r @.Destination := void;/ e+ \0 ^2 K/ i( }1 f0 C6 [
if @.occupied then* k3 y7 [9 \9 x( f) ~8 e
part := @.cont;! }& I) d" C% \% }* U$ J. \) w
@.transpOrder := void;
! Q( I [% @, }2 C$ _6 _& i# F2 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 w2 G* b. C( C- I- L- P5 W @,root.eventcontroller.simTime);
, I s0 X0 f4 p0 o1 @7 y @.HasOrder := false; q. |2 }* t; N) B1 k/ A
@.DrivingHome := true;
- E9 z S! g! j. M rgManager.tryToStartTransOrder;8 u& F. w9 p* i. c" b ^; H& p; \& d/ u
if @.Destination = void
4 } r" N) R. _ D' I9 q! ^# D then -- no transport order for vehicle @( P b& F' w! ]
@.Destination :=% o3 v% J& G/ y
rgManager.nearestFreeStation(@,track.~);1 t; {- c& D9 r! J+ p3 L
newDirection(@);
! F5 {4 \& g% Z+ Y' n- [ if @.Destination /= void then' c0 \( D6 O# x5 ^1 ~4 P+ n4 y
@.Destination.NumReservation :=; P9 D6 i) D& d- c* ~3 k
@.Destination.NumReservation + 1;
8 \! ]$ g' v: j6 D0 n% J l9 ?# {. @ end;" d7 W; c, S' T T$ R A* Y! x a& A
@.CurrIcon := "drivingHome";2 j+ T$ c! ?" E
@.DrivingHome := true;
, K L& R: U. |5 @- W3 p$ U end;# U" N( O# C0 ~1 G* f$ S3 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }9 ^) {3 w8 C( X9 \7 l- _, g part := @.transpOrder;
2 y1 H) h* P5 N4 A part.move(@);-- load part/ F& S" q+ O6 P
@.CurrIcon := "load";
- V! h9 r+ n4 f/ ]8 h h0 x GlobalDistObj := part.globDestination;
' n4 o4 a* C6 m8 i" _ y$ } assignLObj := rgmanager.rgAssignL;
/ r$ z. o9 J& F row := assignLObj.getRowNo(GlobalDistObj);
0 P4 U+ Z2 h) i. B if Row = -1 then -- since 70/ C, m* o! ^+ @5 b. k# f3 l
if lan=1 then
3 B" S, ]9 G# ]' S$ K) t" @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; B5 A* m/ E V: U
to_str("in der Andockstation: \"",?.~.name,"\""));5 [1 c1 }# j8 L P, b1 E1 @1 L
else
h$ ]1 j I5 H) M9 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), B4 K2 K/ R* Y
to_str("in docking station: \"",?.~.name,"\"")); ) d |! f7 ]& V
end;
8 j5 t, x- s6 N% H+ K. G else
; V0 H' C3 X$ h( m" y6 v @.Destination := assignLObj[1,row];
_: l1 E5 `+ i end; . g' {3 h1 C2 E% l; D
newDirection(@);
9 R* R9 k" F' v Z% |0 m6 i @.HasOrder := true;. ~1 w; B& i# ^# s0 O8 g
end;5 b# ?5 l0 U; p2 i6 k
end;
4 _# D9 p, L$ f; {8 H( \end; -- of the method
( z: c! N8 Y- v4 y, h" a& E |