/* called by: entrance ctrl of the object 'track'
7 q7 T! L3 r% ]# E( ^*/& E5 M9 ?5 ?7 N# o2 J- f: [
is5 B5 w6 ]" Z+ @$ P/ b: G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 [% r) G. x* r5 ldo
. P1 q# W* [' p7 N9 w. s Lan := rootfolder.Internal.Tools.AOLlanguage;
, H6 ]0 z, W+ N2 e3 F if current = @.Destination -- else return
# U# U& x+ ?% Y% X! ^3 U6 ]5 I then/ q" k; l3 g. n" G& E1 C" ?
@.Destination := void;
F" D; [8 w% Y: `+ Z) R if @.occupied then- h1 B6 U/ T, L1 \9 b0 b4 O9 |) ]
part := @.cont;
/ h8 B3 U' w. e3 g3 W% y @.transpOrder := void;
1 ]0 N, t8 p) g# h) g5 N* N2 s& I# m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 c1 |: d& m# t" E! ?
@,root.eventcontroller.simTime);. L% A# } ?0 R% {/ E9 U/ l0 E
@.HasOrder := false;6 k& L" u$ @3 y7 p
@.DrivingHome := true;
: n& x, h" d6 {5 q: v3 b; B rgManager.tryToStartTransOrder;
& Y) P: T" I1 R. R9 ~4 c( u: Y if @.Destination = void# C# |9 k: T, U6 \4 T/ g( I
then -- no transport order for vehicle @
) [; s0 o- B8 { @.Destination :=9 x; N+ U; f0 b P% @. V
rgManager.nearestFreeStation(@,track.~);
( X. W6 H# D8 N+ s9 ? newDirection(@);
8 {; R& _% i u) l0 F8 \& G1 M if @.Destination /= void then7 I4 b( z/ g% W. R
@.Destination.NumReservation :=
* s. F* r# n1 e: G' }5 A @.Destination.NumReservation + 1;2 e0 {/ X& ~" v, D
end;
+ N% P3 O+ o c0 g0 c @.CurrIcon := "drivingHome";- t, ~# k+ c2 j: ^/ _
@.DrivingHome := true;
' Q3 T$ Z% G9 o0 | end;
5 u2 M( ^5 x" u2 n" _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 z5 h% i2 S! @4 n& @4 S part := @.transpOrder;3 ~. \/ G# Q7 q+ y2 A2 H
part.move(@);-- load part! s! A! T0 w" N0 p4 y$ T& q1 F8 v
@.CurrIcon := "load";
6 R/ r- f; @' t; x: j; R GlobalDistObj := part.globDestination;# j. x1 q, b N# E0 ]
assignLObj := rgmanager.rgAssignL;' H/ |$ ^1 _# ~* B3 }
row := assignLObj.getRowNo(GlobalDistObj);
" S2 \4 T' A- X0 ^, r" ?9 e. o if Row = -1 then -- since 70
+ p' p6 w& V3 L# \. [8 U5 {" p if lan=1 then
& r6 [2 |& _1 f Q! w" G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, V& b2 [" X$ L; m/ b) q
to_str("in der Andockstation: \"",?.~.name,"\""));
) z5 J8 Z; B( B ^9 g+ n/ V else+ { A# Y( q& y6 H' X1 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 C4 o2 D! G3 V( q' m9 z to_str("in docking station: \"",?.~.name,"\""));
3 B) a9 W0 M; L% M' b* Q" o end;
1 D7 Y+ s* Z" H/ B: V5 S$ c+ ?4 D else% z& \& m5 i' p: G
@.Destination := assignLObj[1,row];+ S& e& Q4 A/ H" b
end;
. M% F1 G$ r8 \ newDirection(@);. k |; x# C# L% K" ]
@.HasOrder := true;
& r+ D( c. \0 v3 m9 q end;
+ J2 y/ j- M: i1 U end;
0 K+ G& w# E" k, ]* A+ `end; -- of the method
$ V7 l5 ] i: D* E/ a" f |