/* called by: entrance ctrl of the object 'track'( X" u( Q$ x$ N5 k& O0 ]
*/4 q6 R, @+ h% K6 ?/ W
is
4 ?) \- ^8 `; h7 J% _& ~1 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. C2 }# z8 S! D- `5 t* {' Udo# |3 e* g4 W" O8 p- g) Z+ z
Lan := rootfolder.Internal.Tools.AOLlanguage;' D3 Y1 _" D# N6 g5 I6 x
if current = @.Destination -- else return _; V% A, V: `
then$ i2 }0 k) N- l5 P$ [
@.Destination := void;6 _8 ]- a4 Q8 o1 _7 ~) t8 _
if @.occupied then
. R2 m& A* P8 Q* m7 Q' E part := @.cont;: e4 g- u' U5 ]. ~
@.transpOrder := void;
. r- l3 \2 l& u' P, J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 b, n8 C. D: {9 E1 W( O9 `
@,root.eventcontroller.simTime);# ]% a* s2 K* r2 w* [
@.HasOrder := false;
* V% c3 r( W T! p @.DrivingHome := true;, Q* q$ m, R# m
rgManager.tryToStartTransOrder;
% k' i+ R6 i2 L) Z' _5 `3 T# T if @.Destination = void/ B* v$ ?0 w# K0 M, ?) u
then -- no transport order for vehicle @2 f' T* M- {7 H( d
@.Destination :=- u- l2 a' t a( f3 m
rgManager.nearestFreeStation(@,track.~);% r& C+ F/ ^3 ^2 {2 B
newDirection(@); 2 B+ C$ g5 {2 _1 s8 o
if @.Destination /= void then
* @5 @: D' w% H6 z/ `6 W) l( T @ @.Destination.NumReservation :=# b% ^5 L; P. ]5 R( Z, M! C
@.Destination.NumReservation + 1;
( U3 x$ V2 Q+ j9 H) g2 P! ~' M end;$ X* B- p3 A2 M: q- B" L
@.CurrIcon := "drivingHome";
- Z3 S6 P$ J3 S0 F# a @.DrivingHome := true;7 X/ L! m; P) \, ^
end;! ^2 Z: M# }6 g/ z8 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 J* o; E/ Y/ n5 z$ K0 K
part := @.transpOrder;8 A* ?+ @ {9 z/ w0 J% P Z
part.move(@);-- load part; k" ?! c) |* i: A
@.CurrIcon := "load";$ a; g+ r I) m; M
GlobalDistObj := part.globDestination;& E+ `% |' S. J K2 N+ z' ? I' J4 }
assignLObj := rgmanager.rgAssignL;2 X5 N1 @; e; R4 _
row := assignLObj.getRowNo(GlobalDistObj);5 }2 m/ D+ F1 [* b
if Row = -1 then -- since 70
7 n( H* K6 c$ R8 E5 e, A0 D if lan=1 then
5 L6 \8 p4 Z5 U: C# y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 U/ j0 n- J. { a( Q% _ to_str("in der Andockstation: \"",?.~.name,"\""));
) I1 h( k1 w' C4 p; ? else0 O4 F6 s' `* g( W* Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. l7 C- `8 C- I) R$ g
to_str("in docking station: \"",?.~.name,"\""));
8 X, i& Z @) s3 d# f# @' B end;/ b1 L3 Y- C1 T* L- z
else4 f4 F1 \- r+ b; u6 h9 q
@.Destination := assignLObj[1,row];
' I' N* C3 ^# M; X1 Y/ E! a end;
+ ~3 R( C7 n* N2 ~ newDirection(@);# ~9 `7 A$ c0 b! \6 L
@.HasOrder := true;
% v4 i# i8 [$ r end;
" u0 s" p' @- M) H$ v end;9 {/ N. |# o) l' V2 Z
end; -- of the method# a6 F& H% T1 E( }
|