/* called by: entrance ctrl of the object 'track'
) ]% r' q- Y* o) B" D# o: v*/
. y# x( c7 _9 ^, r/ h: D7 }) Yis
) ]7 M% a7 t( z; x8 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 n% t V9 o% c$ d5 ]% Ndo
# k, A, j& s" Z$ F: f' } Lan := rootfolder.Internal.Tools.AOLlanguage;
2 o; D, s( F9 g2 g5 \+ U( |: E9 n if current = @.Destination -- else return
( _: M' F& Y g then
9 b( b0 Y" ~" N; Z6 v @.Destination := void;
9 ]( A- Q7 ^& c b9 a if @.occupied then
0 B. S |$ [; q6 c/ r1 h part := @.cont;6 u! P+ m! {4 H, q4 K3 Q
@.transpOrder := void;7 c( F0 ~5 q1 i& _/ C, u. @0 F o/ _7 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ _1 F# p( _9 ~3 b9 n3 D6 B @,root.eventcontroller.simTime);3 Y. I# X9 j2 H
@.HasOrder := false;
7 }5 P$ T& ~& u @.DrivingHome := true;4 Q0 k& ^- s5 u# ?+ {
rgManager.tryToStartTransOrder;! h2 Z" Y9 s% t8 ?
if @.Destination = void9 V! A5 O, w- C
then -- no transport order for vehicle @. u3 r* k' \1 |8 r
@.Destination :=$ t7 k4 Q! E2 ?7 V6 c) U* W6 g
rgManager.nearestFreeStation(@,track.~);. |- O$ n* T. @# W+ Y' I# R
newDirection(@); 3 ^& D0 ]: Y2 r4 K9 e( g+ [2 z
if @.Destination /= void then
* V* _5 P6 L i9 ?; d @.Destination.NumReservation :=
+ D) d E6 h, N$ y0 A- U( F9 m @.Destination.NumReservation + 1;# d% I, n$ F+ w$ c
end;3 T- z5 N7 k4 F- z
@.CurrIcon := "drivingHome";/ d' t! ^ h, ^& w
@.DrivingHome := true;
% T6 x- t$ @2 G end;
( [8 z6 z$ e6 ~) @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 R8 G) f) Z% C- B5 C% I2 N' F
part := @.transpOrder;
- ^+ [% K% F9 S part.move(@);-- load part5 H6 v; ^8 w0 L& ~; F# L1 t, G
@.CurrIcon := "load";) X, p' X1 N0 |
GlobalDistObj := part.globDestination;
$ J' t; _4 q: k1 Z m j& ? assignLObj := rgmanager.rgAssignL;
/ T" J- ?3 X/ Y3 Q6 L$ U3 e row := assignLObj.getRowNo(GlobalDistObj);; u) W/ {) m0 S" K; q/ w: q9 ?
if Row = -1 then -- since 70
7 r) Q6 m6 d. l, C! L( f if lan=1 then
, e3 C) ~7 @* s# ^: ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ i* c a- f* B ~ to_str("in der Andockstation: \"",?.~.name,"\""));9 a/ V; e5 d) A: N7 v# b& O0 Z
else% Q L$ I7 ?# u( Y9 f$ D7 i, ~0 U% o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. B/ L& ^/ G, o3 d
to_str("in docking station: \"",?.~.name,"\"")); ; h4 j$ V# J! F/ `! I( O
end;3 y U g* P M n6 N" ~2 |
else
, U& ]; D' F" {$ |1 l @.Destination := assignLObj[1,row];
: a& V; }1 f/ O3 |. {. y end;
4 J# P: z- k2 E newDirection(@);
. H2 x0 b8 b$ k1 S @.HasOrder := true;8 R8 Z! v3 j$ g
end;+ U/ B! e# f9 |6 x, I- w$ u% V
end;
; z% _: \0 ]2 g, h6 `( Jend; -- of the method
' X) n+ q& L& {' F& B& _ |