/* called by: entrance ctrl of the object 'track'$ b4 B$ S8 ]1 t% K' O! t
*/
! j* j" Y! x( R1 J9 U# Tis
3 C2 d) C9 w- F$ N part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D" @2 h4 Z' N- w
do
7 q, ~% ?5 b* F6 r+ h Lan := rootfolder.Internal.Tools.AOLlanguage;$ [* u Z8 ~8 Y
if current = @.Destination -- else return
2 H0 N8 b% N& O$ N3 x1 i) } then
4 M+ K- G6 f' q" D/ O @.Destination := void;" ~% t& \: w( x$ a2 B
if @.occupied then) n0 G* @4 L0 ?, d( R- D
part := @.cont;/ P$ {! K" u$ F# s
@.transpOrder := void;
# H& A) Q* F3 B* A8 y0 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' S1 Y( t+ m7 P( k
@,root.eventcontroller.simTime);
, v1 a; W* a9 ]7 R) }' o @.HasOrder := false;
. n; Y7 Y4 x4 a" K0 Q @.DrivingHome := true;
1 I3 \3 j' b9 q# N rgManager.tryToStartTransOrder;5 D( e4 K$ h: b- Y
if @.Destination = void
( z8 v6 x$ p4 V, N F0 C) m% ], t then -- no transport order for vehicle @
6 N$ L' a- \ u0 } @.Destination :=, D- a2 F/ F% N1 M- `
rgManager.nearestFreeStation(@,track.~);2 A0 D. u$ K( V9 |
newDirection(@);
6 V- v% _+ U3 X8 b4 T! f4 O. V if @.Destination /= void then
7 J0 e; i @4 b9 J: e5 R @.Destination.NumReservation :=
; J( j- l/ [. x. l: t, y& S& O+ S, u @.Destination.NumReservation + 1;& I8 G b( }: |2 z; r/ b3 G! o; m, \
end;* p/ z" ^( L1 _- O4 s
@.CurrIcon := "drivingHome";
0 S% T, i" y# h8 ? T" n/ z, B @.DrivingHome := true;
" p9 ~9 j/ j; [( F. F% b end;
7 ]0 f# \, E q else -- the vehicle @ is empty, both vehicle and part are in the same dock station) t; \2 K$ ^! ]+ L/ _) _
part := @.transpOrder;
5 J) o% B+ ?/ B& ? part.move(@);-- load part
$ a( o2 Z' @$ g7 B6 O+ o @.CurrIcon := "load";
" R' W( R. N$ {; A# l I GlobalDistObj := part.globDestination;7 x7 P! X t6 c3 J
assignLObj := rgmanager.rgAssignL;6 s% A. S6 Z p; ^) ]9 w4 G) V
row := assignLObj.getRowNo(GlobalDistObj);
/ A7 W `) C, y/ n! h if Row = -1 then -- since 70
9 t8 i; k2 a9 L. I1 C3 |" h if lan=1 then1 |1 k, D5 \& }5 i* f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 @( `6 J# h% {( N7 K: f" m& J: b
to_str("in der Andockstation: \"",?.~.name,"\""));) V0 f: D$ N/ r4 {4 `, @* Q R. [
else) Q4 |9 ~+ \) e) D, q! b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Y4 X3 A* T, \ to_str("in docking station: \"",?.~.name,"\"")); 1 ?" _# W- f$ N" v" X
end;5 Z/ Q# X! U* Z' C, _+ Q. z
else
+ i; h' a" D3 _4 v x; i; N @.Destination := assignLObj[1,row];
" @4 S, j7 ?5 ]0 X end; ) ^' p* b8 x: r. F9 D
newDirection(@);
0 G; O2 X! J2 z/ `1 X+ s8 C @.HasOrder := true;
2 ^$ m# A. N$ B" K+ Z end;. I( G' o1 q( u7 z, W7 `" L2 ?( [) \7 D
end;
" \/ V0 Z* d' r" t4 I7 Send; -- of the method4 I! G" S; w* `& p# Q
|