/* called by: entrance ctrl of the object 'track'
, b* ^; O) P: r/ `4 V/ i7 H*/1 |# e( n+ | C( n( P
is
1 ]$ k3 h" C$ ]1 [; k part, GlobalDistObj, assignLObj:object;row,Lan:integer;: s2 A( j& f/ L1 ~9 V# u
do
& |) T; R( z9 R- s) s4 y) [$ o" Y Lan := rootfolder.Internal.Tools.AOLlanguage;
& \( E) y. T6 q) a if current = @.Destination -- else return
! N9 n) G' u2 S7 s! o0 H then0 r! G& B* K9 K# C6 y3 D
@.Destination := void;
" H! L0 `% h5 D2 o3 X1 N if @.occupied then
. `, C! z) f" F9 p4 \3 e part := @.cont;5 r# ? k: E; |; O7 }& u q" B: d
@.transpOrder := void; q' S4 L& |1 _7 p( w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; s3 Q0 m9 J5 D$ ^8 e7 ]; i- b
@,root.eventcontroller.simTime);* ]5 h2 K+ N1 k
@.HasOrder := false;
0 l0 \( _! q+ E7 A @.DrivingHome := true;. r% D) Q z: p |1 H& {
rgManager.tryToStartTransOrder;
1 h6 \+ C4 m0 |6 ]9 [; f1 T if @.Destination = void& ~5 s7 U4 M2 g" q9 U6 g6 l
then -- no transport order for vehicle @
( ~" L! e: Z; C6 { @.Destination :=
" j% e3 ]. t- z Z" A3 z* A0 | rgManager.nearestFreeStation(@,track.~);' f" f1 t% a p- W
newDirection(@); ; D" ?3 S: S6 |3 ?+ {) {
if @.Destination /= void then
5 Y0 U. F' I& m1 b& ^/ q6 t* z Y @.Destination.NumReservation :=) C! a% q, D t5 s
@.Destination.NumReservation + 1;- X: ^! A6 d( v' u1 x3 l( j
end;
& B" a3 t' u2 K, ^6 L- J @.CurrIcon := "drivingHome";
" f/ z4 k6 O3 K' F4 O @.DrivingHome := true;( m+ v+ l4 x' K& e
end;# l' V" p4 T- \5 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 J6 e2 s h0 v3 r1 f! [ part := @.transpOrder;
& y2 d) e1 E2 ? @8 n2 P part.move(@);-- load part J. w5 ?# W4 D+ t* s
@.CurrIcon := "load";; \! W a+ j% \4 T# f
GlobalDistObj := part.globDestination;
- ?- y) r: u2 X4 p assignLObj := rgmanager.rgAssignL;
' j8 j% M; R4 I7 V5 a( C row := assignLObj.getRowNo(GlobalDistObj);
( Q1 _. D, T- r3 Q" H if Row = -1 then -- since 701 a* y' \! K6 ~; p
if lan=1 then: D7 f5 e$ g. w- ?% o6 B7 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 k0 v' Z% @) \* D
to_str("in der Andockstation: \"",?.~.name,"\""));
: w$ U& c- J0 X* } else- H- a: j$ K2 h0 s; v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 S0 w/ p+ U! }! \# g O to_str("in docking station: \"",?.~.name,"\"")); 0 C& D/ @* P3 C6 j) B' q
end;" e! u. ?2 g' C1 x# h# o
else
) Z( T! W3 v$ E3 f @.Destination := assignLObj[1,row];4 e; C- [' _( t, }" }
end;
0 d# e) G" j. i+ L( [2 g6 _ newDirection(@);
) Z) a C4 T6 {1 D+ j @.HasOrder := true;8 k$ J) f# Z* ]3 N. k
end;) y# L& [3 i% b& f
end;3 Q. V! h1 E$ |/ D3 r
end; -- of the method" j8 T/ X# B+ W" @* D5 k: [
|