/* called by: entrance ctrl of the object 'track'
% v [, p1 H& S# q. W, x4 x0 Q*/
- g3 n* O! a5 I# E; E6 wis8 O- G3 d, L5 {1 x; g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 p9 F* |& Q+ o6 X/ V2 h a1 h& Edo
2 E+ y1 O6 p% w* c9 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 v( t3 ^& _' l# C if current = @.Destination -- else return
1 l8 H/ c- F5 _8 b7 Y# \ then) T& `/ G4 g1 o. N- s8 g
@.Destination := void;
; I7 U4 b9 R9 C5 \ if @.occupied then
3 X. O! {. l8 _ part := @.cont;! n8 T0 L# a! R4 ~1 G+ K R+ y% H$ y
@.transpOrder := void;' c$ }8 A7 V4 M3 |) k) V! U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 u! \2 O% _) q* s% R @,root.eventcontroller.simTime);. P7 o/ |' o0 f* _
@.HasOrder := false;
4 b' C$ {+ [5 v" q @.DrivingHome := true;
( ~$ k1 t2 a0 K0 Y$ [& L+ S rgManager.tryToStartTransOrder;0 h+ X8 f5 j3 ^
if @.Destination = void
3 U9 k( ]2 _( ^- h then -- no transport order for vehicle @) r: N3 l+ }7 N# ]8 `: p% W
@.Destination :=
# R8 }' P9 X1 C rgManager.nearestFreeStation(@,track.~);$ m3 y2 s: `3 D2 x; q) w( t
newDirection(@);
2 o+ U) S! U. y0 J6 R if @.Destination /= void then9 L0 I: N2 M6 d# w: v" f
@.Destination.NumReservation :=
4 m: s% q3 R4 R) l2 x @.Destination.NumReservation + 1;
3 l2 |* @7 l' ?4 V: V2 v end;7 H+ E9 c( }$ D% E# ~! p5 A# [6 R
@.CurrIcon := "drivingHome";" D6 j/ Q5 e$ V6 X1 L' Z E! }, t
@.DrivingHome := true;9 p) ?0 ? F5 }$ X }+ _
end;
4 d; ~, u% u9 u3 B+ [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 Z7 y& Y* `) I
part := @.transpOrder;2 m+ u( F( A9 W) o: S0 H
part.move(@);-- load part
1 d- I# U) V X7 C* B9 _5 d; [$ K @.CurrIcon := "load";
: q! a: H5 E! L- a8 P5 |/ A GlobalDistObj := part.globDestination;
* s% y9 t( q' _/ { s; Z, T assignLObj := rgmanager.rgAssignL;
n7 P/ F- r0 t row := assignLObj.getRowNo(GlobalDistObj);1 N, x' E' G6 q5 ^, N) ~8 [
if Row = -1 then -- since 70
. F8 i" }5 f8 U* W( _& H0 B$ @7 ` if lan=1 then% P" P7 H2 d) K" ^( u1 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. g: `3 }- ]% a4 g, M4 W. O to_str("in der Andockstation: \"",?.~.name,"\""));8 {$ k: j& P+ C1 y. z" D
else: e6 O! m$ ~: E% Q$ c, H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 B( O' H5 K4 H" D to_str("in docking station: \"",?.~.name,"\""));
; u* n6 \& \ } end;
g+ ?" B* g+ W" M* p# I0 [ else
8 V' `' |0 q' e: q4 m2 V @.Destination := assignLObj[1,row];7 }' m9 T/ y. @9 e, ?; Z
end; ( C4 @: Y" g1 B& z7 i: q: U
newDirection(@);
5 Z1 q# a5 j+ [1 z* u ?7 x @.HasOrder := true;' x" b5 N" P+ B* U/ \
end;! c6 ^* s0 K/ N
end;2 u2 t! t. h( }+ B. N+ E
end; -- of the method
' n' l5 E5 e" c' } |