/* called by: entrance ctrl of the object 'track'
9 H: ~! ]/ J# X' n6 Z- S7 Q& P*/) I" ?. G! z) ^8 K/ m5 D
is0 Q+ U' ?" _ h7 k# q' p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( q- t! ] C! k! Q% [3 F2 Q! ]
do
& Y: X; Z/ ?4 \$ y" {/ g Lan := rootfolder.Internal.Tools.AOLlanguage;
' l* o! Q! @4 ]. M/ A/ o4 v M if current = @.Destination -- else return
/ j# H; ?+ Z8 f8 \ W+ ]1 G* F then' z* Y5 {) k# y, K
@.Destination := void;% g' h5 `1 d7 M3 l# o/ t6 k
if @.occupied then! _8 {# O$ l& W& N& ]
part := @.cont;+ g) }2 b7 k7 v I4 ]+ B
@.transpOrder := void;4 H* S( U8 y# ]6 Q3 ^+ d6 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ r+ j, i4 n& p9 W
@,root.eventcontroller.simTime);
* v- F) j7 h/ O# x0 R, ^9 U @.HasOrder := false;/ Z4 W( h) u \) ^7 _) \) V9 E
@.DrivingHome := true;
2 j4 p, i( F& Q4 F9 P5 T/ Z rgManager.tryToStartTransOrder;
- I$ l1 q: X$ A/ w3 a if @.Destination = void
8 q& a% D) K6 }2 |0 j then -- no transport order for vehicle @4 K/ O7 y4 u6 m
@.Destination :=
% h* j2 f. g2 R3 l. W! G1 } rgManager.nearestFreeStation(@,track.~);
5 C* k0 e* I6 K: E" T8 ?( v5 R newDirection(@); # t0 S' G% `: ?; u. _
if @.Destination /= void then0 a* q, B! z! |6 I# `/ I8 O# g
@.Destination.NumReservation :=
3 P; ?2 C; J! d9 c @.Destination.NumReservation + 1;
/ Y2 m$ H* _2 ?% y6 { end;7 f& I. _( C; O j r; y, C% A
@.CurrIcon := "drivingHome";7 e9 K, g0 l5 K4 B
@.DrivingHome := true;6 ?2 t8 X7 N4 t3 O
end; M L. h$ w. f- w1 P6 G+ T' e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 v7 P2 |" F0 ^( _9 s+ _ part := @.transpOrder;4 ~% u% ?/ I' F1 l. g4 d
part.move(@);-- load part$ J* W, g% Q# P) V2 `
@.CurrIcon := "load";
/ T2 @' B; j1 ?% T& B* M. r( ? GlobalDistObj := part.globDestination;
7 u/ {; @% Q. ?& \2 J5 y assignLObj := rgmanager.rgAssignL;& s# w* r" b' g5 N
row := assignLObj.getRowNo(GlobalDistObj);
8 V8 ~! M6 [' k, G6 n4 x if Row = -1 then -- since 70
7 t M, t1 o; e4 I) h5 \+ c if lan=1 then! { Z7 C! s7 w) n$ I' \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), R* s; U1 @. R! @1 I
to_str("in der Andockstation: \"",?.~.name,"\""));: p' J; X! A" |# G4 v1 }( O
else3 k' g; u$ t! |( t+ g5 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Z$ h8 h6 r7 l6 K
to_str("in docking station: \"",?.~.name,"\""));
7 k1 H( W. s2 X+ i+ P+ V1 L end;
6 U: q9 S* \" r else; x2 x" ]% N+ T2 i3 r% ?* X8 t
@.Destination := assignLObj[1,row];2 |9 g0 h1 Y ^3 p0 E2 |
end; * S+ k) @ S7 M
newDirection(@);
! \6 ?, A, X+ a2 I: g @.HasOrder := true;
6 [$ ~ ?- R8 z! ]# }+ |" w& ^ end;" f3 t z; b; V$ j
end;. t& q" `- j" Y9 y/ M
end; -- of the method
; q3 T7 _! m! Y# G! h' [ |