/* called by: entrance ctrl of the object 'track', I; D% E( v! o! G9 c
*/; K( ]! w' V% y: A* H; {
is
# y: d X2 @0 O& V& _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- x. j, I* B- A6 m _0 ?1 X# `* h) n7 bdo" J6 X9 ]4 \. e$ H0 e5 L$ n) `% W, J& @
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 @: c* H# r* i5 @ if current = @.Destination -- else return
1 N d( p! M( v" V- @6 T( ? then
7 X! F6 z' R1 b( L% E& m @.Destination := void;
9 o2 H+ X: {# }. S) o2 ^ if @.occupied then
8 f; h: s6 t6 k$ ~6 J- N y part := @.cont;, D- T3 q4 ]; F
@.transpOrder := void;
$ c) ~! g, L. `+ M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% A6 k8 E% S) h k! q) q9 [
@,root.eventcontroller.simTime);
+ w T/ S; |( N% n$ g1 \* ? @.HasOrder := false;3 p* P3 n. b+ }- m( I
@.DrivingHome := true;2 n, _& J- z' |6 @2 h
rgManager.tryToStartTransOrder;* x% J" b3 o& D: H
if @.Destination = void" N( g) v4 s% l- m* @! _' r
then -- no transport order for vehicle @ v( u3 j. w4 p% T4 R4 n/ P1 @% W
@.Destination :=
* Z6 q t7 N% j# r# I rgManager.nearestFreeStation(@,track.~);
; @2 u: [' j/ X newDirection(@); 8 B5 C" c% f; a% @( T
if @.Destination /= void then p4 m8 V1 R6 k1 u4 C K/ }
@.Destination.NumReservation :=
/ S5 a) U# y4 A4 P @.Destination.NumReservation + 1;5 U; M! G# C) {$ T" ^) W
end;
( ~6 T5 l0 w! |9 g. [1 k @.CurrIcon := "drivingHome";
& [8 w" ^' m' G% X5 v! z0 W @.DrivingHome := true;
6 m, t! }% E: L% c" F! L2 l end;
) q. g7 F+ D" W. x else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 c& V$ m5 a8 J+ M: [
part := @.transpOrder;
8 k* Q8 g, L* o% F part.move(@);-- load part
7 k$ B) t! J3 ], |9 g: |0 I @.CurrIcon := "load";* _4 `/ M$ m. T, i% g
GlobalDistObj := part.globDestination;9 }) a# z% Y; [
assignLObj := rgmanager.rgAssignL;
* q4 @6 z" n5 `( S/ e row := assignLObj.getRowNo(GlobalDistObj);
% @, V8 c' y$ r if Row = -1 then -- since 70- x0 P$ w) m; i
if lan=1 then' ^. F: c/ J- V: B. k+ e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; O1 C; ?2 _9 a9 |
to_str("in der Andockstation: \"",?.~.name,"\""));
- B% V6 w& R6 F+ s8 l else, E/ C! t! B/ P4 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 q' b% C# k; N$ M D% \ to_str("in docking station: \"",?.~.name,"\"")); : K3 e6 I# {7 ]& c9 u
end;; s7 J: f+ P5 e4 l
else
# F! \' ~" ]. U+ k+ c @.Destination := assignLObj[1,row];! p8 H: c7 ]! e' H
end;
5 [3 D( E: S) k" J newDirection(@);
9 ~5 |/ T" K, e* l6 y8 ? @.HasOrder := true;% Q2 H Q7 @& g) l) `; N, A
end;
* |, n2 q, E" p' L end;
9 n$ e7 d9 R0 [* R* Jend; -- of the method
8 x0 t+ ^! Z3 w! c( K |