/* called by: entrance ctrl of the object 'track'1 ]; \3 e5 g# W" Q7 [* _" p" c
*/
5 M0 O. W. e5 S7 _+ z5 {7 dis
/ j' E o1 r; m8 j2 Q8 Z ~* w3 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;! i/ f, i5 O, C8 X- {# b
do8 j) Q! N' Z3 c9 h
Lan := rootfolder.Internal.Tools.AOLlanguage;' k2 N- E2 @( f+ @% M: z. X# I
if current = @.Destination -- else return, G, j5 N1 ]& d& P% X: t
then
, H* n! ?. e( n8 I3 m! V @.Destination := void; W3 R6 n, E& s( p
if @.occupied then9 Z& t& y) x+ N$ k9 k
part := @.cont;! x% b* N; p7 L
@.transpOrder := void;) g: d/ P" j; e. N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. U! M3 `: w* g/ ]1 L
@,root.eventcontroller.simTime);
! J- Q7 \. c) T* V. Q2 Z, C @.HasOrder := false;3 u! j" }: m T
@.DrivingHome := true;2 `- h& e$ p0 T" N" v* A, @
rgManager.tryToStartTransOrder;- m" ?* T9 c& I; t, @$ g5 a6 P
if @.Destination = void
1 y, V* f0 o/ V0 e7 W6 b0 | then -- no transport order for vehicle @
* p* s# ~0 ~) L" i! j; m, _. S @.Destination :=7 u4 i8 X# [& x1 W' ]( c R
rgManager.nearestFreeStation(@,track.~);
- E% K1 I: K; {- h9 ^ g newDirection(@); ! L, E+ x- k* N* x) \+ b- i, q; C+ A9 W8 ~
if @.Destination /= void then
" o0 M3 C0 t+ g+ D @.Destination.NumReservation :=
5 t/ w! j! U% H G( p- L R# G @.Destination.NumReservation + 1;
/ {) ^2 v# l+ [( k. P- j& s end;% c( U" Y" W9 K5 U
@.CurrIcon := "drivingHome";
% S: @" P) B1 K; h1 }, i2 b @.DrivingHome := true;- p, k2 O! S4 C, u+ k9 Y2 L
end;2 z+ r# t4 v9 e, B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
q) U( Z6 \- ?# Q( F) ]6 }7 ] part := @.transpOrder;# y7 J! v2 ]0 T, | d' o$ ?4 K
part.move(@);-- load part% t/ |! m3 S7 l
@.CurrIcon := "load";
4 _5 i, N" K! _$ T6 V1 h! _) E, N3 r) l GlobalDistObj := part.globDestination;- _! A/ ^: v2 K
assignLObj := rgmanager.rgAssignL;9 U" m$ r% N% g& ^# F
row := assignLObj.getRowNo(GlobalDistObj);7 S6 w* r& r: b# M% k' ]
if Row = -1 then -- since 70
9 ]4 @' {, b9 Z. i' l if lan=1 then
2 T; H7 j! N1 ?5 j- Y( K+ T8 F6 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 w3 {% p7 ]6 b/ v5 t
to_str("in der Andockstation: \"",?.~.name,"\""));- l+ }3 O( W! F' C T4 f, q
else8 C- X B, A) q' P ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! z, r H8 r. o H- z/ X
to_str("in docking station: \"",?.~.name,"\"")); ; n# B' _' ?# k4 W
end;
: e2 G; ~) e7 N4 L+ ~ else6 j! o" e1 y/ Z6 w1 N" X3 r
@.Destination := assignLObj[1,row];
9 @1 S. a& v5 g end;
" m$ W) X! l5 F4 r newDirection(@);
1 O- d. i6 h7 m- L) E3 Q @.HasOrder := true;
( e7 c9 i- g" b) a6 L7 c* G end;! X: b+ y+ w* o
end;
8 M/ O" j* J& t4 N2 v. g: K0 E* f9 yend; -- of the method: _7 U* p Y: C; [/ f5 t/ n: c" v, e
|