/* called by: entrance ctrl of the object 'track'
6 v' I4 F- o5 M" m- S3 b' X1 ~! k*/
) [6 M4 ?- {, H# o$ A+ xis v7 z Q0 O5 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 x! |! ^- C$ w' o/ S7 Xdo
% {6 `7 W: E1 O/ ` U* N) n Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Q9 [9 M* U8 J if current = @.Destination -- else return4 Z) I) P { {1 L. j0 w# |
then2 H0 F5 i) J# J h" r
@.Destination := void;6 }, q7 a/ [% L( o" t& v5 y
if @.occupied then7 |+ B+ m7 C, n( e5 J7 Z
part := @.cont;0 y. H# _4 G2 f0 Z0 S
@.transpOrder := void;
# U* B& V, n, W- ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, K/ S. T) C' ?3 |
@,root.eventcontroller.simTime);3 M* b# L9 L0 j# ~/ z; c
@.HasOrder := false;
4 w/ X# V h5 i# D, Y7 P1 n @.DrivingHome := true;
j. |7 B$ v; C* K* m rgManager.tryToStartTransOrder;5 g1 [6 D+ w3 _0 j3 m2 o( Y, T
if @.Destination = void
8 u! c' g! N. f+ \" T then -- no transport order for vehicle @
4 i4 _6 Q$ a4 O0 | @.Destination :=
9 j5 {+ G$ b+ a. @% e! P rgManager.nearestFreeStation(@,track.~);
( w/ D: g/ k+ i* T& M newDirection(@);
+ u2 G' G* c1 V# [0 { if @.Destination /= void then
g, h! [3 N8 o2 G @.Destination.NumReservation :=3 [. I- s& ~* ?7 f9 ~. J7 S# F4 s
@.Destination.NumReservation + 1;
) S& `9 I$ V! Q5 V! p: v- ` end;/ l5 {& L4 k2 }# P
@.CurrIcon := "drivingHome";+ f3 U* y) Z- U$ K' d9 ]- Y5 B6 i( E
@.DrivingHome := true;
" J% s+ M; S* H9 b& }" X2 T end;
# @6 c, b& i# Z- { else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 T: g% x* `8 |, O4 c
part := @.transpOrder;% {0 i; c) p2 ?# O
part.move(@);-- load part
. V# e" R% Y G& w* W D7 T @.CurrIcon := "load";
' v! R5 @, C4 A7 ?! ~+ V GlobalDistObj := part.globDestination;
! a. y2 y) r; K/ m3 ~8 P assignLObj := rgmanager.rgAssignL;- ]2 [! v2 d4 w
row := assignLObj.getRowNo(GlobalDistObj);
+ L! ~/ E. k% \2 u+ X if Row = -1 then -- since 70
' z# n7 M# _0 p2 R& p# e if lan=1 then
6 Z5 A& [, r9 Y9 u9 l; d ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 A9 n( m! Q8 Y$ J: |
to_str("in der Andockstation: \"",?.~.name,"\""));: v @" N- z: h: e
else
' a' D$ A$ j) a* v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! c K s w% H to_str("in docking station: \"",?.~.name,"\"")); 2 s7 t- b# l% ]
end;
& s/ ]& q3 y. V8 N: _ else4 H+ ~* l; _: n$ c
@.Destination := assignLObj[1,row];
- L! E( X% y& [' _4 \8 e& z# w; p end; s! x8 N" T9 I8 {: T
newDirection(@);
6 U8 U/ j6 f( _+ ~- ? @.HasOrder := true;
; J# M. F) R Q+ N' g end;1 \# w/ i) H0 `8 M: g9 i
end;+ i5 `' Q8 T. P5 ]: Y, G7 [+ `/ ~% }
end; -- of the method$ K# J. B+ J, w( K. @3 |
|