/* called by: entrance ctrl of the object 'track'
9 I, H2 w' O! I: t$ i3 ^9 w- l*/. O- s8 G- y: ~" ^8 |
is
9 n; c5 i3 A- r# J" R, ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 A t h/ \4 V5 n: Udo
) F3 q4 O2 O! w! d Lan := rootfolder.Internal.Tools.AOLlanguage;
9 h3 r R, S: U4 P if current = @.Destination -- else return
& e( z' z1 v! y then" P, j H" w/ r/ p4 W2 K
@.Destination := void;* y! ?: Q$ j* M2 |. R& z. E
if @.occupied then
- R: r- J& K' H/ [, J4 C part := @.cont;
% Y3 G6 b9 W6 V2 H# P d. s @.transpOrder := void;
! s' j# h- \8 m1 C0 M% i( X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X" _9 ?, v+ z3 E: i @,root.eventcontroller.simTime);2 w2 U8 }! t, a
@.HasOrder := false;1 x5 S, h+ _& q1 n
@.DrivingHome := true;
# ?8 K1 r% h- u. t8 v rgManager.tryToStartTransOrder;( |& y5 m" x6 r. v! |
if @.Destination = void
/ _: T; _' K4 P8 e- A" } then -- no transport order for vehicle @
1 O6 p4 G G- t/ Y4 U1 ? @.Destination :=4 M& g3 g0 ` o- c7 q+ Q# u0 G
rgManager.nearestFreeStation(@,track.~);6 s0 }, |5 h9 D- F3 [2 q! b
newDirection(@); + {' r3 L9 D3 q& y7 h! m% L
if @.Destination /= void then# u3 s7 f1 H6 P, z
@.Destination.NumReservation :=7 `7 O% N" |1 I& }- R2 Q2 ~
@.Destination.NumReservation + 1;
4 w/ U3 Q' C$ }/ @$ F end;4 a& [5 {7 n. }9 P8 x' \
@.CurrIcon := "drivingHome";
+ c f% {# S- E @.DrivingHome := true;( U% i# v1 s) K$ V' b* Y
end;
# B! [5 ~, F& ?0 D/ e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 ^; x* |6 G. W- a* O$ N: T part := @.transpOrder;+ ?( W/ B) I, {) A0 i, h
part.move(@);-- load part
' f; y" N3 q+ K! k7 w @.CurrIcon := "load";! _! h2 K. p! a' k
GlobalDistObj := part.globDestination;! u+ N5 A" d0 A5 X+ f, r* A3 ]
assignLObj := rgmanager.rgAssignL;
! w# p& V5 M2 \$ R% l, C+ T7 ] row := assignLObj.getRowNo(GlobalDistObj);
3 F5 y/ P: B# [0 X if Row = -1 then -- since 70 z. p( b+ ]- \( g
if lan=1 then8 V0 ~5 _2 f0 y# Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 O! A( a( {# N5 r' F3 J$ ?$ ] to_str("in der Andockstation: \"",?.~.name,"\""));
: P& f0 z$ ^$ o, O( R5 W- z else
, T! c( d6 B+ T& R/ w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 _+ q+ m; n" S v- O% j3 X+ ~! R6 p to_str("in docking station: \"",?.~.name,"\"")); * [& @/ T4 Y, e' G$ Z4 F) w5 d
end;
& ^; v! M, N: R" G% n. G+ K else8 T& t0 [% p- Z- h6 M4 E
@.Destination := assignLObj[1,row];
0 _% L3 u4 |: a: p( @7 _% q" J2 Q# P end;
" u- `$ U& ?' w( G; l* C newDirection(@);9 |% ?* y1 G3 j! a! [
@.HasOrder := true;
3 b! o! d4 B$ u7 ^ end;
+ z- n/ s' q8 l/ |; I( C end;
g! b& m4 n4 K, B: A: V% lend; -- of the method
: V, L5 U( j/ `4 L |