/* called by: entrance ctrl of the object 'track'
7 v" |& d& O g& t5 v( J*/" T' u: P, m% z9 P, L
is4 H1 ]: _2 P8 d9 U$ N6 ^5 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& w* d" n1 q% \+ ], _$ Mdo- @* l' b; Y; R, H
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ T- j3 r+ y: u" N if current = @.Destination -- else return# Q: Y* \3 j8 g; i: R
then
6 R; s8 k" B# C9 ]# d: u" f @.Destination := void;
1 V/ l! G0 w$ Q) i$ ` if @.occupied then
, Q2 c% d. Y, F5 c/ { part := @.cont;# D; v* f) J6 p' P4 B4 ~( m( \4 s
@.transpOrder := void;3 ?) t! g, E3 [, u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# }" K, d, ~" g4 B) }
@,root.eventcontroller.simTime);
9 p4 [% m, Q4 [1 h. R7 B1 Y @.HasOrder := false;+ f9 o% b7 M T- _& F
@.DrivingHome := true;
7 _9 U0 l% b/ R0 {7 n rgManager.tryToStartTransOrder;
$ S. Z R8 B Z! ]* U if @.Destination = void
% R4 l' E2 ?& D& E* D then -- no transport order for vehicle @
$ m! Y! n) `/ {* q @.Destination :=
) d* L8 l5 d- M+ k! n rgManager.nearestFreeStation(@,track.~);/ h/ c7 G7 d; o4 Q7 Z8 x; G5 c; r
newDirection(@);
4 Y+ B6 q! Y( e5 t W3 j. ?' X$ g if @.Destination /= void then5 |0 y" r( X4 g9 v0 \* ^
@.Destination.NumReservation :=
% i1 C6 g: I) J @.Destination.NumReservation + 1;
; Z- o8 H- m9 N; ]+ q end;
" ?6 l5 A8 i l- E0 c9 F @.CurrIcon := "drivingHome";* f7 m% E$ N1 v6 @+ g5 A$ U, m
@.DrivingHome := true;
' j. s" G, i7 H; l end;
" K. v9 _& u) ^2 B' w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* w- J" G1 [ e part := @.transpOrder;
* o0 H, {& X9 t- x6 Y8 |7 k part.move(@);-- load part* C; L- P' Y" `- C+ s8 K/ F
@.CurrIcon := "load";
! j/ U/ A2 t- `' c; R2 ~ g GlobalDistObj := part.globDestination;
$ Y# \ s# |' P+ L assignLObj := rgmanager.rgAssignL;! }9 o7 O* H) _4 H4 s7 E* J$ B [
row := assignLObj.getRowNo(GlobalDistObj);( x5 j8 r( u; m; A# F! h9 n& C
if Row = -1 then -- since 70
5 R& r6 S" y6 Y" F0 G. v/ c# q) ^ if lan=1 then% b5 B# M2 g1 H5 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; l: X) N* r( d! k
to_str("in der Andockstation: \"",?.~.name,"\""));
2 p5 O9 j& M) L9 a+ I6 l7 h& x7 o5 X else* ?5 I5 j1 E! Z& Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 S4 ^' y& x; |
to_str("in docking station: \"",?.~.name,"\"")); ) |8 ^( w& i6 T. x
end;
3 O9 C& I$ x5 Q: x; G7 v& L else
5 I- W. Y: T: g' H5 n( A n$ [ @.Destination := assignLObj[1,row];( W f: d9 y B. J4 x. g
end; 8 ~/ S6 I- g) d5 [% Q+ l4 u
newDirection(@);) a5 H3 {) ^+ j
@.HasOrder := true;: J, h! m* {0 Q m5 l& p
end;. X9 l" m( H, L: c6 v; p J
end;
% A; Q+ x8 {2 W1 w% `4 d+ pend; -- of the method
- l8 h" [3 e6 _. I! k% L |