/* called by: entrance ctrl of the object 'track'( Q: a1 q1 U/ T. X3 ^6 `% P$ S5 T
*/
2 b6 k* j. Z3 c5 Qis
5 i0 c$ V; i; O9 t0 f# I1 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 Q s& r% [% |* Y" @$ a
do
: ^0 @- Q* y+ f* ]0 }- B! x% e Lan := rootfolder.Internal.Tools.AOLlanguage;
* v/ m( }/ A4 R: q if current = @.Destination -- else return
, r; x f4 p& `- O then! K9 `# J5 J8 Q8 ?0 Z0 h& g
@.Destination := void;" _; a. _2 _1 i) j" U F/ O' b
if @.occupied then
' A" T: a* k0 c- }8 M part := @.cont;
$ o& ]! S. t `, H4 V0 b @.transpOrder := void;: u0 T7 n9 p' G/ a4 g# k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ b- I7 @& X+ R9 a @,root.eventcontroller.simTime);' g e* c' J+ Z" X4 d
@.HasOrder := false;& f5 ~( _+ D4 I6 I/ q
@.DrivingHome := true;2 J* ?& m* R9 d
rgManager.tryToStartTransOrder;
* }2 J6 [; _. l if @.Destination = void- Q0 X: k4 ~% [# o6 e6 w
then -- no transport order for vehicle @
. q4 k; F' `: } @.Destination :=/ J7 h- l7 q8 v$ e
rgManager.nearestFreeStation(@,track.~);
% q( @' } C& [1 ` newDirection(@);
/ U! L+ z# H9 u) T1 ^ if @.Destination /= void then7 O) \6 h) j; U# G1 V% X3 n
@.Destination.NumReservation :=
7 o* {) m4 l3 w& @; f3 T, R @.Destination.NumReservation + 1;9 w& O3 a( m) o+ \- {( }8 u. L
end;; E) r% j% t% f. R+ P" D
@.CurrIcon := "drivingHome";, n- k2 M' l8 l3 x. m
@.DrivingHome := true;* j& G# J; i) p
end;
3 n) x; G( l8 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station. i* l; I! d8 M) y$ P* s
part := @.transpOrder;
5 [3 x S8 M! t x+ g part.move(@);-- load part
1 ~: s1 Z$ ^' B; L7 a/ m @.CurrIcon := "load";. U: m5 A# R2 K# X. H
GlobalDistObj := part.globDestination;
3 D- J+ M7 P3 H. c# |, {6 R assignLObj := rgmanager.rgAssignL;" |- T) z/ i0 S& g- z5 i3 j
row := assignLObj.getRowNo(GlobalDistObj);- N( F k/ Y4 _4 l# T
if Row = -1 then -- since 70
0 G4 U2 ~9 T. K% E! I m+ h) D if lan=1 then# Q7 O5 e( m4 o1 r$ L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" m& [7 ?! J) _' Q8 N5 M$ h to_str("in der Andockstation: \"",?.~.name,"\""));
; R. |* @5 ^" u, {8 r2 J else
* n, F" V0 _$ f1 b3 |* x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ E" S( z- s# `' Z to_str("in docking station: \"",?.~.name,"\"")); # ~# N O/ ?. Q. n% \, Q/ h
end;
' z2 w8 x7 q2 B# b* Q' g( J else
' j( H5 y9 p4 n5 W @.Destination := assignLObj[1,row];. O8 C; S3 ?3 g: b3 ^
end;
$ H3 h, G( B9 i2 H) |- w2 A newDirection(@);2 `! r; W' D; |3 d1 q5 P
@.HasOrder := true;0 }4 }# E5 Q0 l- H! B6 ?
end;* X: U: u8 ^! p! f- l l# y2 _: o' w4 m
end;" R5 N2 S4 [9 w8 }6 H0 ?6 a3 F
end; -- of the method, M7 \4 a' I* O# ?& n2 v
|