/* called by: entrance ctrl of the object 'track'
: H# _- ^" i% {' S6 [% L; e. D*/
2 H: h& X6 b! D8 i7 vis
8 `0 |% v- a5 M: r! S part, GlobalDistObj, assignLObj:object;row,Lan:integer;) y0 v$ Y B7 Y! Y7 p
do
: p: R( }6 u9 p5 S9 F Lan := rootfolder.Internal.Tools.AOLlanguage;! V& ?# x+ t. |2 v
if current = @.Destination -- else return# N6 c- }( N+ U1 G# N) M3 b8 y
then; _& d7 _, A' H2 p; h: O! {
@.Destination := void;. ~; C }; t, ^+ c4 y: a1 }" f+ l
if @.occupied then
( F# L; b9 ^0 U; S Q) }* T part := @.cont;4 V4 v0 t, D( _# W$ o
@.transpOrder := void;% i8 g: G1 n& t& E. @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ A6 V) T7 @+ s" G! l3 h8 M! e- f @,root.eventcontroller.simTime);
/ f1 v, c2 R( G/ O; ^4 Z/ I# a3 @ @.HasOrder := false;, `; D" }$ D" w6 f K( P. q0 t. l! s
@.DrivingHome := true;
- w; X: p7 m5 \& c0 g* v rgManager.tryToStartTransOrder;
8 [3 |" l y$ |' q7 b if @.Destination = void
$ E0 C" P+ V$ {6 n5 o/ _ then -- no transport order for vehicle @
, C7 R! k7 ]' y0 D; ?6 B @.Destination :=3 R% {. d' O4 {9 R9 k+ i) s0 W
rgManager.nearestFreeStation(@,track.~);: R K* R$ D, p. f* W
newDirection(@); $ p- u! K9 A3 p; B
if @.Destination /= void then( s! q: v0 p- }7 s+ I2 a& i' X# X7 }
@.Destination.NumReservation :=- q; o+ |) A, U# w
@.Destination.NumReservation + 1;
% R( D( Z6 }% l: ]4 n( P' E, k" ? end;
/ W( N7 ^: B' M4 M e; c @.CurrIcon := "drivingHome";
9 D) f, W$ u) c7 A! l2 f @.DrivingHome := true;! K% a$ t& S# U2 i0 Z4 Y! q
end;
& D8 r" S J- ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i" v$ n+ J+ v+ E# c( a
part := @.transpOrder;2 S2 D0 L' ~$ p) H
part.move(@);-- load part
/ K# t- N+ B$ a+ q8 ~ @.CurrIcon := "load";
y5 C( }4 m2 K& ~% h/ e GlobalDistObj := part.globDestination;7 X2 u! I1 {/ Y+ f1 A0 a$ d8 U4 N
assignLObj := rgmanager.rgAssignL;4 z% Z W$ n8 N9 Q$ d) Q/ x# D
row := assignLObj.getRowNo(GlobalDistObj);
2 c& j. h! h+ Y: v3 c" f7 y if Row = -1 then -- since 701 N0 c2 r1 }7 e
if lan=1 then
( u- Q/ t# X; i. a3 E& R, V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# D, s/ y6 g% c$ X: K6 w1 u to_str("in der Andockstation: \"",?.~.name,"\""));
2 N6 t }- S- R9 d else
N. o/ V. s- K, P( i6 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @+ \5 L+ a/ [. ] to_str("in docking station: \"",?.~.name,"\"")); # S5 F2 h( _- I" L
end;
9 v6 W' H* X/ N else u3 f' w2 r/ d. g& X v
@.Destination := assignLObj[1,row];) u. F9 z# G |5 s
end;
' k9 g m- D1 ] newDirection(@);$ E* v2 V. ?' i3 t& @
@.HasOrder := true;
0 v2 {& P$ Y9 f0 t3 D! [ end;$ F2 h* \$ b2 Q0 o
end;0 Q. |5 P6 B7 k3 _7 |
end; -- of the method
0 B7 I$ t! {% h- s" q |