/* called by: entrance ctrl of the object 'track'" A9 t$ g+ J5 u8 U& M2 s
*/
, S' \0 C7 }& Z) A# Mis8 v* O/ B+ m- X+ |' m% i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: G( N* z" O( o, L& R: J
do
( T# L# R7 A" Y Lan := rootfolder.Internal.Tools.AOLlanguage;7 t* h' T6 A& R
if current = @.Destination -- else return( t( I8 d; ~+ H3 r" ^/ u. l; I
then, t8 A7 Q/ \5 i# @* n% N
@.Destination := void;
* W0 @* t' z3 C! d: A. J if @.occupied then
/ x9 Z( }* h/ D& B. r5 o part := @.cont;, k ~/ G* k' V, I0 E4 G E
@.transpOrder := void;; f8 P! K. V2 |) g( u% y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& D: \6 E1 l* I( N
@,root.eventcontroller.simTime);$ {; J. c2 T/ U" l6 ?- a$ l/ h) U
@.HasOrder := false;
5 r& z9 q, e1 Q6 P4 d @.DrivingHome := true;: ?# s. A2 H+ E) V5 a
rgManager.tryToStartTransOrder;
, R. ?) T3 R0 p* D3 o; q: O3 S if @.Destination = void
/ ?2 l" A3 U1 o" A/ h then -- no transport order for vehicle @, \! S% g, m8 t# U4 k; ^! f% z6 a
@.Destination :=4 H3 ]* \5 j) w1 U
rgManager.nearestFreeStation(@,track.~);- [/ [1 M3 j X; |2 I
newDirection(@); % F m5 {! J1 f. Z' v
if @.Destination /= void then; J, [2 b2 [! \8 o1 e: d( Q
@.Destination.NumReservation :=2 U d0 {9 E6 ~/ h& h9 o, M
@.Destination.NumReservation + 1;/ H& k/ b& p- L ]1 q
end;, V/ A0 F% w; j' L. z! [$ {
@.CurrIcon := "drivingHome";
' B R: L9 }5 P. z, D1 L @.DrivingHome := true;
4 n" |6 d# v" i+ Z% c* t) I end;6 S6 n7 W, v0 Y- F# D* d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station r" A9 \+ [/ t' K+ X6 [
part := @.transpOrder;
. \6 D2 y2 u! h+ P part.move(@);-- load part; @) ]6 I0 A3 o2 W* c% i5 t
@.CurrIcon := "load";( K+ ~ w k8 _* {" m+ h0 b0 f
GlobalDistObj := part.globDestination;
# z- J j# _4 S& [# [: {) P* X assignLObj := rgmanager.rgAssignL;
2 O9 ~) E. k9 T2 B row := assignLObj.getRowNo(GlobalDistObj);
" ^0 |7 q6 u( R if Row = -1 then -- since 70
. t s. x) f, I E* R. Y# y) V( Z' W if lan=1 then" Z6 E5 v9 b$ G5 y# j5 }; p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), u+ |$ }9 ]& b- o7 B* W
to_str("in der Andockstation: \"",?.~.name,"\""));
# k9 {( K0 e& w/ l* C' p7 n else: o+ t; M& z5 C0 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 A) { q& E, I( P C' Z: u
to_str("in docking station: \"",?.~.name,"\""));
( J, v a) }& B b/ `% |6 m) N( L end;
6 U3 c: A. e0 c4 ?! z1 r, \ else! g8 B/ q* q8 v( ]: l
@.Destination := assignLObj[1,row];6 F7 A& I$ W" B* |* _
end;
: e+ K9 U6 A4 R! V6 l newDirection(@);
. z" K/ {" L6 G @.HasOrder := true;8 h! G/ W$ d1 a
end; q& x! p" n. ~0 d# y) D: M3 U
end;
3 F9 P, C, [% K* [/ Gend; -- of the method# E1 J% T5 K( ]& b' z# M; H4 O, {
|