/* called by: entrance ctrl of the object 'track'
: K) ?# w, U$ Z*/9 _+ J0 ^; e1 _0 ~
is
' b9 I# t8 U1 M% E! a5 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ p/ C5 Z. r8 `" _' K/ Rdo, F+ H* q9 Y/ {0 G+ v
Lan := rootfolder.Internal.Tools.AOLlanguage;9 V# o3 Z7 ]- d
if current = @.Destination -- else return& f8 @* \- _; M% L7 f/ m5 R
then
8 ?. C* I) O8 A8 p' N! o @.Destination := void;: S0 H6 B/ b; m3 S, ~1 C5 }; p
if @.occupied then
/ O: l9 E4 \& s/ X! f% v. W1 i part := @.cont;* _8 }2 S- V7 J L# H
@.transpOrder := void;! [/ Z8 L. k' ~3 ~) t/ C' V5 z( y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 V$ e8 C( J0 r4 R
@,root.eventcontroller.simTime);
* |9 ~3 H8 |4 D5 Y1 c3 b" Z @.HasOrder := false;
" A( }) r9 x$ t e5 t @.DrivingHome := true;
$ b6 M3 j# G- ]/ v rgManager.tryToStartTransOrder;& i. @& c0 T$ |( q9 j! k
if @.Destination = void
3 `. {4 l/ Z0 i1 q then -- no transport order for vehicle @
Y, m( ?# a4 e5 y U6 _7 j @.Destination :=+ ~' f3 Z: |* w' K+ b
rgManager.nearestFreeStation(@,track.~);
2 C4 H& k& W; ^1 w+ Z* ]& L$ } newDirection(@);
: d: _9 b+ b+ f( @ if @.Destination /= void then% Q! u' p2 T9 Z$ ^ J) |
@.Destination.NumReservation :=
8 w4 n' w0 w, @ @.Destination.NumReservation + 1;9 B2 U3 o9 s) F, t
end;& z3 J2 s1 `1 j+ S& w8 k
@.CurrIcon := "drivingHome";3 i3 U7 x$ m) k' A4 U9 m
@.DrivingHome := true;$ R. r7 i: l$ r2 b4 J
end;
! g+ W- h- C; g. {! h- I else -- the vehicle @ is empty, both vehicle and part are in the same dock station( y- m: p+ n8 h; g
part := @.transpOrder;
: j+ ^& }, Q; Z% e3 Y* H {* f part.move(@);-- load part
( O& Y1 j. G& m4 q6 w; d) E @.CurrIcon := "load";7 m+ C& `+ _2 q1 ?7 h
GlobalDistObj := part.globDestination;
+ W( b& g; b" P/ Y% [ assignLObj := rgmanager.rgAssignL;/ F' k. ^7 [* Z
row := assignLObj.getRowNo(GlobalDistObj);
! u! z' `( ]' u3 U4 [ D if Row = -1 then -- since 70
- ~- Y, D7 D) d9 ]" Y* {) f if lan=1 then
5 a R M7 Z- F. U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& U+ Y; _" p* |0 h: L3 {
to_str("in der Andockstation: \"",?.~.name,"\""));
1 D/ h2 M* S2 G( S$ ^ else
( S. b7 W4 e8 z" K8 Q& G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, e/ Y$ ]6 Q1 o* s
to_str("in docking station: \"",?.~.name,"\"")); 8 @% M7 h. |" N2 V* \/ {8 w; S4 s
end;' A, i" e5 r/ [" U
else& v' N7 E4 y e) u( X/ C- g
@.Destination := assignLObj[1,row];
4 \. L2 g; W1 k* U7 S% ~7 b9 F end; ) `$ y/ {7 W t& y
newDirection(@);' L* _- \# F1 }5 ]! X
@.HasOrder := true;' h7 [* y6 k" F
end;
! ~5 A t6 }' G6 y5 [) F end; r) `$ J& O- h5 h
end; -- of the method/ B* H5 g, r+ k S; ^$ K
|