/* called by: entrance ctrl of the object 'track'$ n4 J6 M2 ~: ?! v; f; f5 c8 W
*/# K3 ~* h4 ~* T: G1 h
is: ]4 a. w( P6 _5 c! x1 \/ f: J! P3 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 q) N9 P5 {5 L& m5 ido
5 \# Q i, Z% z0 w3 c% ~; q Lan := rootfolder.Internal.Tools.AOLlanguage;
$ C8 s4 H5 o0 G. R% ^ if current = @.Destination -- else return
& l9 n7 t& N# u$ e; l then
- Z e7 H8 i3 y( ~4 h0 T3 ~5 o; P @.Destination := void;
& p3 ]# @6 F) \! x7 p9 e4 b if @.occupied then
! p% H7 \5 T s9 H. s* K: g. X part := @.cont;
; a/ i4 J$ o5 H4 o1 f. \ @.transpOrder := void;
# h9 Q" V# v$ s, y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 m, m$ }8 g4 ^$ R& r& A6 Y. j3 ~7 k' Q
@,root.eventcontroller.simTime);" o* b% O; c# O; ~5 I
@.HasOrder := false;
3 x! b3 B; E1 q @.DrivingHome := true;
* z7 ]1 i* g% z* j9 Z# b* d rgManager.tryToStartTransOrder;
8 X, _6 S, N' `9 O }: | if @.Destination = void: T+ X, |- t o' j! b5 ?
then -- no transport order for vehicle @
5 n8 M+ O2 q$ J6 ]) ]: X$ G @.Destination :=; n5 [) H& X/ b/ G8 N- E
rgManager.nearestFreeStation(@,track.~);! u, j7 h8 w# z! G& }1 c: _1 g
newDirection(@); 5 `7 }( z0 `4 r: c! H- T
if @.Destination /= void then
' G9 J% E: x& n5 m @.Destination.NumReservation :=
: S% i" i% [; p/ E2 u; @ @.Destination.NumReservation + 1;
( g- D/ V7 h7 u. v end;
. ?7 P7 [* G0 l @.CurrIcon := "drivingHome";
9 t2 s$ {6 T, H' d) ~' U @.DrivingHome := true;
# A3 T9 N4 n5 J) o* [7 O5 E end;
3 H& {5 c$ L% v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ~5 z R7 a* N4 I6 D( P+ _ part := @.transpOrder;
" ~" i6 W/ t- I+ ] f part.move(@);-- load part2 Q; K9 i1 ]" H+ ~3 O' Z( t: u
@.CurrIcon := "load";+ w' }; W2 q. u) k+ W
GlobalDistObj := part.globDestination;
4 `0 R0 w4 l6 [/ p2 o assignLObj := rgmanager.rgAssignL;8 C7 q5 T6 m5 s, `% g) _" _
row := assignLObj.getRowNo(GlobalDistObj);
* d! ]5 A# ^2 H( h( T. n" V if Row = -1 then -- since 70
* L8 A% w$ P; c) T i if lan=1 then& t T) K/ K7 H2 a" t' M" A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 C4 c. r9 @9 C5 N* Y0 u; M
to_str("in der Andockstation: \"",?.~.name,"\""));- O9 e6 l# M7 @+ ]/ J/ M
else
3 M' l1 `' }1 v; b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 F6 o; @: W) @8 ^! M to_str("in docking station: \"",?.~.name,"\"")); ' { ]! ^4 E% u1 f( x
end;
0 P% t( h' b- E0 a2 `7 i! I5 {; i else
+ n. ~6 x, `. @5 p. H) j+ T' X5 }" ?" E @.Destination := assignLObj[1,row];! c' \- I2 z- C. w Q% p
end;
% R% h+ `9 a/ q5 g3 n' e ~" s newDirection(@);
- D5 s5 M; d8 G+ f @.HasOrder := true;) q$ J, O0 @7 L! V! A8 f1 B5 \
end;8 A; S( S, C M: ~! @2 [/ ?9 o+ i
end;$ } X, j( X+ }$ j
end; -- of the method, `8 E# }9 d# p5 V' J) h
|