/* called by: entrance ctrl of the object 'track'
9 M6 r* N8 ~, a: [*/' h8 i {0 f \0 |, }
is" x/ \/ Z' G: u1 t3 k2 e0 D1 Y1 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* R T; k5 X2 m6 [6 Hdo
: \/ F% |& W+ E Lan := rootfolder.Internal.Tools.AOLlanguage;
7 D0 F% ]" s: X( N% S if current = @.Destination -- else return
/ k+ R. ?+ p# k0 i7 r then
8 Z% L8 h# b/ n @.Destination := void;
9 O1 e: \3 P& q( b! ]" n if @.occupied then
: ?% L6 A3 x! o; K! x$ f: W part := @.cont;! X8 J+ b; r: X! I- N
@.transpOrder := void;% [; |; V y" E5 f9 _# x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" i! W/ \7 z2 ` @,root.eventcontroller.simTime); s* y" L5 I( i* c9 \5 A; `
@.HasOrder := false;* K, ?9 d. [" P; j
@.DrivingHome := true;
( h% m* ^: L1 r# z rgManager.tryToStartTransOrder;
+ c3 ~. ]+ e1 a% ?. \ if @.Destination = void- J% t& o$ P+ J9 ?
then -- no transport order for vehicle @
& c( @" x* b$ I, t @.Destination :=
- f( W7 N( j( s rgManager.nearestFreeStation(@,track.~);; u- O, Y0 c: q0 G8 d/ P) @9 l
newDirection(@);
3 ]2 Y( \8 C( q8 f6 T if @.Destination /= void then
, G2 K. M1 v3 Y- J( h9 G+ ^" {$ c @.Destination.NumReservation :=
3 F# |: Q6 {+ L( z @.Destination.NumReservation + 1;
) @, }% P$ D% `, P7 C end;2 ^* r! u4 |- } J# F0 _
@.CurrIcon := "drivingHome";7 j6 s9 w( v/ X" h
@.DrivingHome := true;% x$ m$ m1 |, i- g7 ~, w6 G' o
end;( j: B `+ k1 K4 |! z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" y& |0 i$ u* \) e1 {
part := @.transpOrder;5 V* @& j1 M/ U( I5 d9 @* [
part.move(@);-- load part
% }" X6 w; f' t2 ?# h @.CurrIcon := "load";
4 ` E& O V' {! f* L+ g GlobalDistObj := part.globDestination;
/ M; l6 ^7 H+ Z0 g5 {% i assignLObj := rgmanager.rgAssignL;* L& b' W0 u) y3 e4 S# l9 C
row := assignLObj.getRowNo(GlobalDistObj);
3 X% G& z* v: ~& ~+ j1 N% E if Row = -1 then -- since 70* |/ a9 A" P" \5 }5 B
if lan=1 then4 z( ?1 ?% l: X$ O" i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; M! t. ~8 d D5 n/ E! U: }2 F to_str("in der Andockstation: \"",?.~.name,"\""));8 o9 Q. K- W9 P
else
1 `+ _+ Y. U9 J1 r- x, D y: s2 R5 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; u0 ]$ e& o1 G1 {
to_str("in docking station: \"",?.~.name,"\""));
! h5 Y0 S0 F. C/ J* z end;: ~6 U7 H5 E6 {! X' w
else
% o) G5 u) g3 ?8 `5 I3 U @.Destination := assignLObj[1,row];( E* R8 Z% F y
end;
2 Q0 m# \6 E5 F8 ~0 M& b newDirection(@);
! M% Y+ ?" U: n# X @.HasOrder := true;
3 p0 @+ C' S2 v6 S end;+ P9 _6 H: N0 X
end;
6 j$ M/ X% u: ?( Eend; -- of the method4 e4 w& H& i m& j+ Y4 [) D- T
|