/* called by: entrance ctrl of the object 'track'
) A9 ?) |- y$ \8 \. ~" W# [5 [2 L*/' ]" \% a. U" r. |$ ~2 m' d1 D# w
is$ y! N+ n! q( Y+ q# ?+ T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- p% j8 k( `) d" \+ p9 ~
do
. {8 V3 |6 e& a( r+ U" L Lan := rootfolder.Internal.Tools.AOLlanguage;6 J- u; @; C% D
if current = @.Destination -- else return
2 r7 h9 K: h9 [7 ~ then
) D4 q% w- P# I @.Destination := void;
4 y- F- k! f' s; U3 ? if @.occupied then
) \% d+ X0 `# p part := @.cont;
% a% a5 _3 p" J/ U, g X# m @.transpOrder := void;
+ ^1 P7 F1 ~& i6 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ }* g5 X% x! S, Q4 E$ W
@,root.eventcontroller.simTime);2 k0 J {7 v U3 O
@.HasOrder := false;
; Z7 o% ?1 i7 V; Z @.DrivingHome := true;; ^8 T7 s) _& ~) e/ Q% O! {
rgManager.tryToStartTransOrder;
F& a2 C2 m/ q% K if @.Destination = void! r' b: n* D- \/ M' v% u2 _1 U
then -- no transport order for vehicle @
' V2 E |, g2 p @.Destination :=+ @0 S" L: z0 a+ [1 u# V( y
rgManager.nearestFreeStation(@,track.~);8 ?7 N# }( h& w( `9 u
newDirection(@); 9 ~! B) Q$ M( V- }; V( z
if @.Destination /= void then
* S) r. _% o7 s- a% c @.Destination.NumReservation :=$ f) O- _4 r: Q; }, ?% l# p
@.Destination.NumReservation + 1;$ a S4 D8 t) k+ F) c" x4 ?6 r
end;1 q, o: _6 m! ?2 H: O: y
@.CurrIcon := "drivingHome";* ?8 I4 H0 I* m9 `3 u
@.DrivingHome := true;
0 H2 ?& C/ n2 X5 f5 z8 B6 P end;
! f, C, _' K/ _$ m; C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 `& ?/ X/ N+ S6 B$ s part := @.transpOrder;; i' ?7 _8 h/ H1 X) M% T
part.move(@);-- load part" Z5 f5 \& k9 }0 a1 p
@.CurrIcon := "load";
Z J6 p) P' ^ ?- p* {2 v GlobalDistObj := part.globDestination;
9 j4 e- O' ]% K [ assignLObj := rgmanager.rgAssignL;3 c* u6 k0 I, J9 P
row := assignLObj.getRowNo(GlobalDistObj);
* M. B. l& W4 d/ T# B$ w9 {; x! w if Row = -1 then -- since 702 _9 U6 K5 Y7 m3 A/ a
if lan=1 then
; \% r2 a3 z3 w7 D1 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 _3 j/ l# A# J$ j6 |4 r4 q7 Q- R( D to_str("in der Andockstation: \"",?.~.name,"\""));, R$ e' Y5 \& |6 \7 o) K- o- l
else
$ W0 K- H; A d5 O4 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& O2 P3 ^! x: K+ y0 Q
to_str("in docking station: \"",?.~.name,"\"")); & P+ @7 t4 Z& R
end;) X) o H3 r% E, r
else/ \+ L; q5 N% e& h+ v. h
@.Destination := assignLObj[1,row];
7 q2 q4 P5 c, `4 |7 _' O end; 0 v/ c9 b5 e' y1 F+ k
newDirection(@);
/ J _2 g* Y& {: U" m, X @.HasOrder := true;2 t, s1 _9 R$ w3 \2 u& I
end;
5 ~" x$ g9 M7 u' V# [* Q end;
; k( \$ G; ~8 Tend; -- of the method! }( u, N( X7 K( | D- j7 g c& _
|