/* called by: entrance ctrl of the object 'track'
1 J3 [6 ?- L+ n8 b. } ^2 `: M# t*/1 Z. J# V) z$ B" `( _5 H3 R
is
# p' {4 [) Q5 E7 s# C6 e$ ^" O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 r/ [( ^* O l) _! x0 H% H+ Rdo7 z) l8 R9 c" Q7 |' g2 {
Lan := rootfolder.Internal.Tools.AOLlanguage;& y R) h5 z X
if current = @.Destination -- else return; ]* @ J8 W! P {$ Q4 F! M
then- K1 F* ?( @7 y: H: @
@.Destination := void;& q3 S! @$ Y& g# I" l
if @.occupied then
8 ]8 s7 r& H# T( |8 `# P$ H( g part := @.cont;
2 \& i4 b# H) D$ c8 ?2 w1 j0 r @.transpOrder := void;
4 Y9 t/ o1 U7 g1 j' F2 H8 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& p& u0 F! Y+ C7 F
@,root.eventcontroller.simTime);
6 {9 ~# R% I) u @.HasOrder := false;* ?' ]# B4 Z- v" Q" O
@.DrivingHome := true;
) n$ ?- T: V. N# h3 |7 T" i rgManager.tryToStartTransOrder;* r8 F# N: p6 \7 \+ S g8 K
if @.Destination = void
( ^, D! o* D* r1 ~# N' s" q8 C+ [& e' F then -- no transport order for vehicle @
: \+ {* S$ s. z4 H n. ]; x @.Destination :=: t+ F0 k/ ]5 V# u3 R" ^' `9 ~% ]
rgManager.nearestFreeStation(@,track.~);+ S W" u2 Y# r6 s4 e; I$ j: z, l
newDirection(@); 5 i4 Q- i! v. r& t8 f! c9 U# }4 V
if @.Destination /= void then. [( b& s. Y( I3 s- o; e! J
@.Destination.NumReservation :=
6 Y1 A- {5 D6 B5 \& q @.Destination.NumReservation + 1;6 V1 k! u! s4 O
end;0 I: `; ^4 y- Y9 `" I. ?! u1 ]
@.CurrIcon := "drivingHome";
+ M9 T- I0 Q: ^9 M4 l @.DrivingHome := true;: }2 p8 D% l! M- _
end;
# {3 w8 l+ V5 e' v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 B7 q3 G9 e1 E" T1 s part := @.transpOrder;; q# k6 L' E# B b, o5 M
part.move(@);-- load part1 l8 ~ p$ i( O) J3 `, s
@.CurrIcon := "load";
" h6 h& U0 b" A& [8 J GlobalDistObj := part.globDestination;2 u+ f" d* h) ^+ k4 L" B* {9 R
assignLObj := rgmanager.rgAssignL;: C* K) V/ X, i' E
row := assignLObj.getRowNo(GlobalDistObj);% N: K: W3 Q) l6 R
if Row = -1 then -- since 70
3 ?7 _4 |/ V2 ?1 O4 } if lan=1 then
- U/ R+ a) Y* r; H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 Y$ w4 V# P7 N& z- g to_str("in der Andockstation: \"",?.~.name,"\""));5 P0 o' n0 o: D# \6 s, K
else7 m' r; [8 y6 q( s! V9 G0 }6 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, Q, t! u+ L/ A* k to_str("in docking station: \"",?.~.name,"\"")); $ A1 v4 N4 c# [! L
end;( \8 K' e* X: [" X0 N
else& e, M% ~6 \7 j* S% D7 [
@.Destination := assignLObj[1,row];; Z* \: t3 v! p
end;
: [) r8 T6 R1 D- ?1 ~$ M8 D newDirection(@);% t0 l) H8 F% j# _% H$ t% M- M3 t
@.HasOrder := true;
0 x# z# R7 m0 y. O2 J4 X% ]. M- o end;
, b5 E- d9 Q' u" l end;- W. k% R9 D. }( j" U" d) d
end; -- of the method3 F4 L9 i: f9 L
|