/* called by: entrance ctrl of the object 'track'* p. K4 E% t/ L5 B, w. w" G
*/3 P. b) F# t# c& w- d( Z
is
3 l* o1 c, F6 h7 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
q u- Z4 S$ _ mdo
" J! h" s: ^2 P( @$ R1 t& }& B$ \ Lan := rootfolder.Internal.Tools.AOLlanguage;
. K4 u" O! h! b0 J( J if current = @.Destination -- else return
/ U: L3 T! Q9 h2 Q- P then6 |+ r H' a" e( q' A
@.Destination := void;/ W& D5 w$ r+ a
if @.occupied then
, [0 f" Z W6 r+ D4 Y part := @.cont;
W- y2 E8 |: [1 g, t1 K @.transpOrder := void;% m$ U* T, _* V# o) ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; u' h8 K" Q/ x1 l0 R @,root.eventcontroller.simTime);
" u9 G- {/ ~& ]4 x0 Z& X @.HasOrder := false;. k7 s" j/ V/ X( E- r% Z) p
@.DrivingHome := true;* b6 i* D4 A; [" q/ y5 ^
rgManager.tryToStartTransOrder;
% Z. N+ h% H! S/ p2 P0 z' e3 T# o9 ~# a' q if @.Destination = void* t. J' T8 z: U( F1 g' ~! \
then -- no transport order for vehicle @
4 U# l) Q y7 A& z( V* \- M @.Destination :=
6 h0 q2 a1 u: j! E" ~ rgManager.nearestFreeStation(@,track.~);8 E; F# B& m, }' V; X5 E! O# w4 ]
newDirection(@);
: @& [, H# q0 j% w' ^$ y( n) q if @.Destination /= void then
; f. q& } {# O$ |$ [* O @.Destination.NumReservation :=
' c( Q9 M$ k6 @- Y9 V- r @.Destination.NumReservation + 1;
' C4 s# b5 F& B: A end;% E* ~5 i4 K2 K- o
@.CurrIcon := "drivingHome";% p9 L4 o, _7 K! w7 |- ^
@.DrivingHome := true;# G2 M7 e% F4 k5 f! p
end;
* U, x' Y4 m% u( _6 n* N# w# S! u else -- the vehicle @ is empty, both vehicle and part are in the same dock station# t$ C& s( ?( m* P8 S
part := @.transpOrder;( J( d) J. s1 z" K5 ]
part.move(@);-- load part. g$ V8 [ @+ S9 k
@.CurrIcon := "load";7 D! }- _# Y; ^0 S- m
GlobalDistObj := part.globDestination;
( a% ~. ` Z) {! p1 h O( ^9 Z assignLObj := rgmanager.rgAssignL;
0 R4 n/ Z H: v5 j' u7 M! P row := assignLObj.getRowNo(GlobalDistObj);' \7 Y* \' `: H: t- L* A5 p
if Row = -1 then -- since 70# F( H7 z6 `- O
if lan=1 then- [5 V3 J8 d' A% ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( [$ \) d0 K; j. o" k to_str("in der Andockstation: \"",?.~.name,"\""));
\+ F' q. q- y% I' O9 W' T4 | else: ^7 j+ {9 A! o" {6 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: E& f1 i) w" T* k$ Y( E, J
to_str("in docking station: \"",?.~.name,"\"")); ( O' K, Q2 j5 G) J; @* m0 _
end;' ]- V8 x0 A; Z9 A! j7 a3 ?
else
1 u$ M$ @3 A1 o) @, i5 K: Q Y @.Destination := assignLObj[1,row];
3 i% a+ B5 X& Y% s7 q6 l5 E, B end; 7 d4 @, z% M1 i+ J
newDirection(@);4 ?* `! }9 U. _. B/ a! {$ b
@.HasOrder := true;
; c2 |) P" p% ~+ d: s! C, R end;
6 `( L. \" t1 e! _9 H end;7 V+ s, s4 T1 W' l, s/ z1 y
end; -- of the method; E' ?2 I6 O6 p4 ~# S, }
|