/* called by: entrance ctrl of the object 'track'& I+ F# K3 v# H8 h' F1 X
*/9 f4 O+ H& W( L/ i; L
is
$ \- {( }1 X4 T$ Z- W6 E6 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 _2 X5 l1 i: e1 hdo
2 t' ?, E% Q5 p' ^3 c3 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
* d9 `$ ?" j4 s1 N! a if current = @.Destination -- else return/ Q) x5 y2 ~3 @) S! J* B7 ~4 k/ ^
then
w, e% k7 `) _/ d0 W1 P @.Destination := void;9 o, B* q0 @. ^. f, A& B5 v( M
if @.occupied then( I8 X' j# x% }9 G# m# y
part := @.cont;
8 D! K$ v* j8 s @.transpOrder := void;
6 T" m" n4 X3 c" F; b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, X e; C/ c3 e2 D- \
@,root.eventcontroller.simTime);
/ n( }, w6 n. G: F t @.HasOrder := false; e0 U. Z$ P$ g
@.DrivingHome := true;
7 V' {" j# V& I5 j9 ?% J) C0 y rgManager.tryToStartTransOrder;: M' I9 g. t3 M. U) k0 b
if @.Destination = void
* ^; H. |6 c. y3 l then -- no transport order for vehicle @7 X1 v' l4 g8 e; R+ N8 X1 P
@.Destination :=' E- P% C* U' h; e
rgManager.nearestFreeStation(@,track.~);3 ]( w' T1 t, ]0 O: ]6 g6 F" {
newDirection(@);
: Y: J% a$ k! h8 N4 n if @.Destination /= void then
! X7 {$ V. C- f$ [( E: d- W @.Destination.NumReservation :=
0 a5 [1 e& K' I8 G4 f @.Destination.NumReservation + 1;" P1 c9 P2 d8 ~4 Z8 x! e% z
end;/ T: c9 Q% |. `5 h1 v
@.CurrIcon := "drivingHome";8 ]* C% }- y# o9 `' Y6 _
@.DrivingHome := true;& x" E' p$ j) b) p8 w" w
end;
7 k7 i# A, J2 M- @ G9 t5 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station: I1 f' H) ?$ a4 i
part := @.transpOrder; O0 A+ J4 X1 l
part.move(@);-- load part
# s$ f( K0 c. W! J0 T4 H- p3 y& t @.CurrIcon := "load";
5 F H8 \7 ~. d w8 E$ t GlobalDistObj := part.globDestination;
+ V1 J2 t' a Q9 C" s assignLObj := rgmanager.rgAssignL;: X& f3 ~. b% o6 D* j
row := assignLObj.getRowNo(GlobalDistObj);
+ N0 E0 a- q9 a# O! }4 e& f if Row = -1 then -- since 709 n. U( [5 |; w
if lan=1 then6 c5 j' p6 `7 L a) H9 f- M. i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: J' m( M1 s8 I5 y to_str("in der Andockstation: \"",?.~.name,"\""));- g/ n+ E0 i- d, r
else3 F0 N: M; z" e, z6 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! x5 }. r, [/ M: E' m
to_str("in docking station: \"",?.~.name,"\"")); % ^& D. }9 L8 g7 N
end;
4 S, Q x- i) Z# g else5 {, S3 N5 b6 T; P
@.Destination := assignLObj[1,row];, Q- @" L' r* _6 v
end;
; |* N4 L# w/ j/ i newDirection(@);
! V3 j# @& j# |) ]$ J @.HasOrder := true;0 {& Q6 o# ?" M8 ?0 a! K- `
end;
% F! _) v) X0 v& | end;$ {; Y" S$ Y" \
end; -- of the method( r$ T- m3 r9 I6 n3 F- H" K0 O
|