/* called by: entrance ctrl of the object 'track'
3 I# ~7 L3 w: I& c5 P% G*/0 R/ U( c1 i j! p) M
is l$ m% v* S2 V6 U2 P9 @& @7 G7 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 S9 L: N0 ]8 C2 a& Ado
: M" u4 X5 b4 h( T Lan := rootfolder.Internal.Tools.AOLlanguage;
6 m1 `" I! O3 _* U, t6 E" R if current = @.Destination -- else return
% d0 y# l; e* b( w then* z' W! @" b- z3 j: d6 `* o
@.Destination := void;1 p/ o+ s8 N! K( u9 I* B \( o
if @.occupied then
* Y% U4 B7 P0 i part := @.cont;
+ e* M( L$ h" g( W/ f @.transpOrder := void;
) Q/ K$ I5 V, ?2 D) `" N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% ]7 x" u& n+ \( Z
@,root.eventcontroller.simTime);3 a. ?% Z# B& ?3 z; _
@.HasOrder := false;
# d9 V/ H% b# V/ | @.DrivingHome := true;; v; T% B3 A; M; z5 v# V2 T
rgManager.tryToStartTransOrder;
* |8 r9 S H L! m7 e' m: A if @.Destination = void
+ Y* F5 p; K, H# J3 a then -- no transport order for vehicle @: b6 n$ Y9 J; ?8 M l3 `0 o0 u
@.Destination :=
9 f G/ s2 \& Q rgManager.nearestFreeStation(@,track.~);3 L% b! j' t+ L# m4 W/ E
newDirection(@); ' t* W: l3 c8 k! U) D7 @
if @.Destination /= void then
- k" I5 j4 k! n5 c# D8 o$ j @.Destination.NumReservation :=
2 Q2 h0 s- ~; F/ e8 M @.Destination.NumReservation + 1;
( J1 l# V* U4 `1 L end;' {( \! D) S$ b/ o% N
@.CurrIcon := "drivingHome";$ T7 a* Y7 n; p7 f
@.DrivingHome := true;6 u7 _$ M% Q! L$ B2 L2 K9 T* L- r
end;- R9 _, _, T- J: I! ], j4 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 ~1 v$ ]3 u- ?4 @$ u z+ r/ M! N part := @.transpOrder;/ l% v2 |( G1 f7 a
part.move(@);-- load part y1 K( x! c. T% W8 l/ p( m
@.CurrIcon := "load";* j/ f2 B6 G. }0 g- a# \ g8 ]
GlobalDistObj := part.globDestination;
5 a7 n& {3 {# q' a) k3 Y- G assignLObj := rgmanager.rgAssignL;
2 R. ^) E7 ?5 m2 M row := assignLObj.getRowNo(GlobalDistObj);) Z) D' N- ]" L0 m a4 `
if Row = -1 then -- since 70
6 e8 f" b+ U8 [4 U4 ~% a if lan=1 then
4 H* ] i) h2 X- O! w+ B' ]; O: X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k! R' F3 K) r# m' D" W
to_str("in der Andockstation: \"",?.~.name,"\""));
# j& y/ f% c$ x% {( N else
; j z% w" H! Q; N2 Z1 G* { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" T" q8 l: N* T { to_str("in docking station: \"",?.~.name,"\""));
9 ?3 k2 e, y( w- H: p3 F end; [; T. t2 G% ?/ c8 t
else
9 W4 a! d1 y) }6 g) g @.Destination := assignLObj[1,row];
7 ?5 W2 O- [; X- X4 u end; . U- j/ p' Y! }( u! B
newDirection(@);# D0 J8 C' f+ ]
@.HasOrder := true;
+ A& z7 }4 h1 P4 h! B0 U& T end;4 W# c2 J8 Y' M. F
end;
2 ^' b d0 r# d5 K5 G8 g3 g% B* Nend; -- of the method! k/ o6 J) F! Y! L( k# @# @
|