/* called by: entrance ctrl of the object 'track'4 ~6 C9 I7 z' r
*/
2 F2 l( B4 |% a k' ]4 k7 P: v/ ris
9 O! A2 x$ H' @4 ]' B# | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U" {/ W9 ~8 f5 P9 ?do
2 A) }: N0 E/ I) l# H' C Lan := rootfolder.Internal.Tools.AOLlanguage;
, H/ Y9 \7 n, h9 B if current = @.Destination -- else return: H* X) t: @7 S# S# R' D
then
" ?0 O$ \% X. ^- Y; E6 ~$ ~ @.Destination := void;
O- m7 K. d( a if @.occupied then
, P* W( |9 y9 B7 g* b# X. C$ Q part := @.cont;. I) B! ?- u A6 l) v
@.transpOrder := void;
0 N3 T5 H# i ]0 h8 Q) v4 ^6 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- Y& D0 s* `7 ~& ]6 G8 Q: s
@,root.eventcontroller.simTime);& `# O1 D; y0 f0 [. \, @& G0 Y
@.HasOrder := false;: F. |3 ]" t3 B4 `* a
@.DrivingHome := true;/ @# @. \! v' c- T5 z6 m4 L* A) H5 v
rgManager.tryToStartTransOrder;' l+ k4 M+ C9 L5 W0 ^8 Z
if @.Destination = void# N7 {0 [* g9 Q/ E6 K9 j; A
then -- no transport order for vehicle @
# ~5 l4 a9 `! G. r1 D" {2 h2 Y' w @.Destination :=, g8 L8 ?+ P5 k, p! x* a" P- p
rgManager.nearestFreeStation(@,track.~);( M' t+ j7 i: i
newDirection(@);
3 E5 k, S* I' d% x% t1 u4 b if @.Destination /= void then
1 q+ h9 t3 M, A' K @.Destination.NumReservation :=
* v `9 P4 b: a6 T: d6 G @.Destination.NumReservation + 1;
' Q) R+ n" o: d4 d end;/ Z: m+ E9 d( @. Z! F7 d. C8 W0 q |
@.CurrIcon := "drivingHome";
7 P) E/ m2 `# _2 ? @.DrivingHome := true;
% _# b% }$ u9 |0 L end;
+ B: S6 O8 F* p% u else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 C+ j$ V9 ]& S ~& L7 U: Z
part := @.transpOrder;
# d; K: S' d9 u# u% a4 S part.move(@);-- load part
. b/ L/ j: }) x9 Z8 H; X8 P @.CurrIcon := "load";
) R6 c5 a- _/ M GlobalDistObj := part.globDestination;
* z4 o1 j# M* q- U" w+ W% L assignLObj := rgmanager.rgAssignL;
5 U1 D+ z. L. f9 e6 t2 k; Z' R- l+ A' b row := assignLObj.getRowNo(GlobalDistObj);1 m& j! W R% {, }0 z
if Row = -1 then -- since 70
' m B% l4 _4 H5 g8 H O$ G( T5 W! p* n if lan=1 then! O1 a" J% y% t, L- z* l* ~) i9 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 q' d7 [& ^# A# ?5 P. F
to_str("in der Andockstation: \"",?.~.name,"\""));
0 d( T4 j" a& e/ A& [- p8 ]- H else
1 v* I% i% A* E- s( ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ H) |3 H. N3 g( ^" U0 v: G8 U to_str("in docking station: \"",?.~.name,"\"")); . o ?0 m0 i' z) |
end;, m& Y# r0 F4 b" G! {
else- s7 Q# O8 I' _) z% d! s
@.Destination := assignLObj[1,row];
% y' f1 l. \4 H8 u5 l end;
& ^! b* R. X3 y2 R7 T, U newDirection(@);# _5 z1 `, V8 B
@.HasOrder := true;
. b6 I7 q& g. D+ k- u+ P end;
" q0 W& T$ r5 @6 b! ^- s) E end;
& t6 E: o: m X; n. A- s% p6 Tend; -- of the method
8 X, J$ Q0 Q! b9 ?+ F/ l! a# [ |