/* called by: entrance ctrl of the object 'track'
# G+ y- e- A' a8 e8 ~! N*/
: a. s6 f t) F5 y8 k2 ~) m# J, Cis
" B" c( w6 m3 E) h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 I$ i( C# e) e5 S) C8 F( Mdo+ p z7 ^& R' M6 R+ k$ }, `! `
Lan := rootfolder.Internal.Tools.AOLlanguage;+ i; H: H" O0 L$ t
if current = @.Destination -- else return
* h, s3 T0 d' N4 s9 p; j3 M& Z then
8 f2 I! |5 a+ u1 h- I8 M& a @.Destination := void; E! m* c5 [/ \
if @.occupied then
) @' O5 H2 ^ _* ]* } part := @.cont;
, I4 ?7 ^) f! R) ] @.transpOrder := void;, J- M6 s, Q& R5 A- }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. h+ i$ T1 v& s0 I& m* T0 k6 W @,root.eventcontroller.simTime);2 N9 Z2 t1 _9 z1 Z- {
@.HasOrder := false;
) h( `9 {" w# A4 w' B- w @.DrivingHome := true;% Y F" u- {1 {4 i1 @, w
rgManager.tryToStartTransOrder;! S7 ^5 s3 w# K$ s z6 `5 k* l5 c
if @.Destination = void
4 ]% j! r6 q8 I. k, m% r then -- no transport order for vehicle @# ~% A, B$ @3 e6 b$ c- n
@.Destination :=
# L* Z- o4 p/ @4 l: U4 l: @7 U5 w rgManager.nearestFreeStation(@,track.~);$ f) z( ?- t* [: s2 e4 x3 u" n
newDirection(@);
% {( f* D- t8 X" M- N8 b if @.Destination /= void then6 @) w. x7 i4 R8 ?' E5 n* p
@.Destination.NumReservation :=
9 j4 A0 m& d; E W1 m; Q @.Destination.NumReservation + 1;3 g" L3 S/ M2 \% }$ D {8 G5 v$ q$ K
end;
/ z/ a: f# x5 U9 r# h1 I1 j' Z4 l @.CurrIcon := "drivingHome";
1 n! n# O% \! i& r7 j, B" j @.DrivingHome := true;- J; ^. i* m9 w: \7 V
end;9 o' W8 q& W# p5 _5 |2 o% m$ C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ t4 n$ o# M0 T! {; n/ t; V2 V
part := @.transpOrder;# o. v- Y! \* I1 f1 S. ~1 Z! w9 m% P
part.move(@);-- load part+ G- }3 F# d }- S2 u$ B/ g6 E
@.CurrIcon := "load";1 d5 _8 S: y5 ~4 B% _
GlobalDistObj := part.globDestination;- A9 o$ `; _+ D) O
assignLObj := rgmanager.rgAssignL;/ b2 M3 L- x+ {( m) E/ C. Q
row := assignLObj.getRowNo(GlobalDistObj);
& ~0 k/ `& x3 d0 Q& ]. h# \ if Row = -1 then -- since 70
% t- m, _8 V; q) X0 t% U$ l! ^ if lan=1 then
( y) q+ s) {: g! q# p' k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% ?7 a- n# z/ \
to_str("in der Andockstation: \"",?.~.name,"\""));
# V9 C! x7 |- P9 A% ~* n, t else
: Q ~; ]0 a! H+ v+ T6 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 j" d k: e- U
to_str("in docking station: \"",?.~.name,"\"")); . E4 @! j' {% b, v8 ^$ Z
end;! k& J1 ]5 C0 V4 ]' _
else& J" P' Y5 a% \) [$ V
@.Destination := assignLObj[1,row];1 v, _9 u2 n8 m9 y4 Q& l$ w) k0 Z
end;
) W1 e+ c9 [. E1 e6 \* ?) ~ newDirection(@);4 Q. U* j7 Z$ G6 [. e! ]+ Q0 L! J
@.HasOrder := true;$ q. M: G* l- h. |
end;4 z6 r u, x2 ?3 c% _. Q( N# ~
end;3 ?" I5 D3 c0 I4 A2 R
end; -- of the method; n: i8 X( i- _8 Q0 f4 X f
|