/* called by: entrance ctrl of the object 'track'
; z' c2 S4 [. X/ f [3 w+ ]$ l( a*/
( v4 A1 ]0 j2 t) t5 z# uis4 o& q' T, W( ~) U% S- h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 I$ v* z' v) G! C3 Q$ Tdo2 s# a" n0 o8 _! _1 u
Lan := rootfolder.Internal.Tools.AOLlanguage;4 D& A. \& J* Q# D; T& W
if current = @.Destination -- else return' V; T2 X/ _& P/ C. ?, W& R7 j
then3 N- m8 I- h0 |) G$ B2 b$ w5 E
@.Destination := void;5 n; S# L1 n/ N! n, S0 l: l
if @.occupied then _0 t4 i6 V! j, O0 g
part := @.cont;
$ W* P* T9 m& e( w" C8 @: U8 Y/ d @.transpOrder := void;& Z5 o H: }+ I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 O' t# C+ B- |$ K) f% d
@,root.eventcontroller.simTime);6 \; _; k' }# j: S; [
@.HasOrder := false; ]4 }/ }4 G7 ~% Y, q7 W$ j
@.DrivingHome := true;
+ K" {8 p$ `$ i8 R3 W rgManager.tryToStartTransOrder;
/ }# }& [; ]+ K if @.Destination = void# }. b# c* d, F- {: j
then -- no transport order for vehicle @! X; t% a/ Z! e: k, c& K+ Z% l
@.Destination :=
& x; s3 P5 U0 I k8 u1 X! S1 A rgManager.nearestFreeStation(@,track.~);
$ o; y# w& E/ L V newDirection(@);
, T$ R* f( t w: x8 k1 }: G& N9 ` if @.Destination /= void then
( z @9 [- |4 x# D; F% j+ ^/ n @.Destination.NumReservation :=- X; D! }5 T3 _7 [ L# V
@.Destination.NumReservation + 1;: z& k* o& |4 m
end;& |' z+ V. i( n3 y) _' i+ l
@.CurrIcon := "drivingHome";
$ |/ b0 Z3 {2 `' H. Z @.DrivingHome := true;
4 m$ w j0 e3 O$ K end;
0 j: y6 m L) n! w' i* u else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H. X7 M2 j: C6 A r! ]; Q# M$ J
part := @.transpOrder;
' u/ S' {) k0 z1 A part.move(@);-- load part1 Q' g* `3 W5 b3 n' L: \5 U
@.CurrIcon := "load";
/ A. l! y7 |, x" l1 ~8 F! k GlobalDistObj := part.globDestination;; v( f5 h% b) e3 r( z: ?
assignLObj := rgmanager.rgAssignL;) p4 r6 z( z# A' ?- [7 n& s' W. p
row := assignLObj.getRowNo(GlobalDistObj);* ] q( q8 Q7 F
if Row = -1 then -- since 700 R5 g! i6 M1 [
if lan=1 then, p" [) R: w& V( k0 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 ]. c! s& i+ D+ _" b' k to_str("in der Andockstation: \"",?.~.name,"\""));/ u; C: {! j, s
else
5 e7 p4 e1 A2 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c& s: e# X* g$ _* E: R. b to_str("in docking station: \"",?.~.name,"\"")); ' X6 n0 d! b5 i1 i7 Q
end;' r; d: ~9 v. ?1 g0 v' O
else' t8 v; E+ t2 w4 ^7 {4 }$ C0 c
@.Destination := assignLObj[1,row];7 }+ ?! G7 c2 Z; }% ~) |- s5 R: `
end;
4 x! Q4 O. v3 Z. d newDirection(@);, I4 m1 U) u6 ~+ P6 l
@.HasOrder := true;
/ f8 Q3 [# E. k& r end;
7 T! d# i! D: p: _ end;
4 G1 U# n5 n5 K" Z- e* Yend; -- of the method! H3 y* N0 s! w0 i
|