/* called by: entrance ctrl of the object 'track', u4 n3 j: O: R' N
*/: @ `* I) b2 R; _* J
is1 i1 r9 z' P) ?3 i- u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ o" @$ `+ F% l# a0 A
do
2 Y- H7 I; B9 U/ Z$ O& o, Y Lan := rootfolder.Internal.Tools.AOLlanguage;- W6 g$ M+ Q! F
if current = @.Destination -- else return U* i. L V6 L. f T5 t3 S* G
then
1 g) N& s( E) K: c! n @.Destination := void;
?7 @! R( I) c. q& M' w if @.occupied then
5 y, i9 Z2 ?- S- ]: @+ ~* O part := @.cont;
' v" p$ \/ v4 O# J) R4 d! J @.transpOrder := void;, N: ?2 A( L. D( s9 T* v6 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; Z1 A0 A/ F" Z9 a% b+ R
@,root.eventcontroller.simTime);3 l6 ~8 f& `6 P( ~/ |
@.HasOrder := false;
5 E: z( Z0 C. o @.DrivingHome := true;
( _2 x ^2 s/ o& n6 K$ Q5 S p rgManager.tryToStartTransOrder;
) v+ {% H/ o6 l- l- k7 w# r4 D if @.Destination = void& F5 ?) N2 p6 D0 K( R. V+ f; l
then -- no transport order for vehicle @, ?2 U0 j- N( q5 V& {
@.Destination :=
5 q$ Z6 F3 T7 B, t4 w$ N1 R rgManager.nearestFreeStation(@,track.~);- Z5 e% E, _, g3 Z+ ?( R/ Q" A
newDirection(@); 5 B O2 P' b: p/ ]9 \8 U9 ]
if @.Destination /= void then
* a5 o$ |. U, v @.Destination.NumReservation :=
2 H7 B3 R, v+ E4 V; q$ ~7 ^/ W: I @.Destination.NumReservation + 1;
7 F1 z" W; N+ l3 ~# v end;3 i$ Q! X, Q3 j2 f
@.CurrIcon := "drivingHome";
r6 i0 x1 G- [' m4 `9 f: R @.DrivingHome := true;! s; g- W: j0 F# {. @* |) r
end;
! s) p0 g3 Y+ V3 |0 M1 P+ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station* m3 Z: t' }- `% L
part := @.transpOrder;1 A2 Z, ~" \$ k4 p; g$ X
part.move(@);-- load part1 O: C0 b! A8 Y, }% \% k
@.CurrIcon := "load";
* u/ d; t) }6 ? GlobalDistObj := part.globDestination;' ^ B2 Q$ E+ L* p) {' l
assignLObj := rgmanager.rgAssignL; ]% P& Y3 M) N$ r9 c. F$ s8 c
row := assignLObj.getRowNo(GlobalDistObj);; o ^9 \4 x% U% s9 h2 W) p' z2 G
if Row = -1 then -- since 70
7 F4 E: ^/ L0 B) L0 Y/ i: @# @$ H if lan=1 then
: M- r! Q( Y; A$ P$ X- ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! x1 @( c9 g! H0 u: Z6 {) c2 @
to_str("in der Andockstation: \"",?.~.name,"\""));
% o4 D3 _! N+ H else, X) N- z& H* [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ T: B; P* u3 c1 m9 N- G to_str("in docking station: \"",?.~.name,"\"")); : r ~$ I9 a1 J8 l5 ]
end;
0 a2 x* L0 |0 R8 Y1 ` else9 k5 x8 e9 R) H, Q4 _7 |' h' k( P
@.Destination := assignLObj[1,row];
7 s2 ]0 X0 T/ c" p u5 \ end;
2 v2 X: S/ y" I2 d4 d( K2 `$ y9 B+ T newDirection(@);
1 a9 i, z) m/ ^# j! z9 ]3 | @.HasOrder := true; u4 C+ J' c6 R
end;, q4 g; K. J4 F3 M6 r9 i# ?
end;" w% [9 F8 T' T% U- r% z
end; -- of the method& z& Z, Q$ Z- u) v5 B4 g( P
|