/* called by: entrance ctrl of the object 'track'0 S2 b+ y2 P# X
*/ n, \- w0 c( x* x" J
is- r' T' J/ B8 B( T$ k' w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ k+ R- R0 {7 r# n' w: g4 x2 c6 H; {$ Y
do; H6 s" x, y/ b
Lan := rootfolder.Internal.Tools.AOLlanguage;& D0 ]' G7 s* b2 z
if current = @.Destination -- else return
# T% R. w1 z0 X' t( U then% P6 ], D z% U8 V5 p
@.Destination := void;
+ K7 C' W! j7 L* t if @.occupied then; V; L( |$ a, w; ], U2 l3 v
part := @.cont;) B9 Z Q9 y9 I& P1 q
@.transpOrder := void;
7 S* _+ d. p1 M% u7 _: V, V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 A/ v/ Y+ S0 V% N+ S) q @,root.eventcontroller.simTime);
* Y5 W4 l8 m/ Q9 n# y; h @.HasOrder := false;- R6 G& n, R7 Y
@.DrivingHome := true;" e F( ], f7 O5 n- I3 W
rgManager.tryToStartTransOrder;
5 l4 q, O, D. C; g# S! X if @.Destination = void
% s2 @& J3 t# j4 A* O( x2 e6 `, G then -- no transport order for vehicle @
5 x: G+ Z( S6 n$ g: E @.Destination :=
, v/ s8 ~3 L5 R0 @: Q rgManager.nearestFreeStation(@,track.~);
$ I% N8 V. e9 D0 k B$ w# t% a newDirection(@);
: i4 v& U; _6 b5 t i5 ^. M$ S if @.Destination /= void then/ S1 R+ i6 X' H0 f
@.Destination.NumReservation :=: r. r6 O( ?' T" f; k+ }
@.Destination.NumReservation + 1;
% B4 A- U Z+ w* x7 { end;
( b: F' F1 P$ S& d5 ]9 J0 ` @.CurrIcon := "drivingHome";+ O- i5 @+ k& l! X- J4 J# }
@.DrivingHome := true;4 \" Y- w: f3 a0 @# o8 v- U
end;
- M) L& {! P3 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
K" |* c6 E, N% K& r$ c, \5 W part := @.transpOrder;* w3 Q% E. G% c' c u. n9 E7 a
part.move(@);-- load part$ Z* E! v0 b7 g/ l6 u' G; Q K
@.CurrIcon := "load";/ K; \+ _3 r9 Y e& c
GlobalDistObj := part.globDestination;
# ~0 m( V$ t, Z' f assignLObj := rgmanager.rgAssignL;
% X6 |* w3 B+ L- l; R row := assignLObj.getRowNo(GlobalDistObj);
" c9 K I0 y9 o( C, H7 p& F if Row = -1 then -- since 70
9 V0 f) X& x1 E) o- K, \+ [ if lan=1 then
6 I9 i$ I5 C H" P9 u: w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 B& x8 M5 {0 ?6 v7 G: M to_str("in der Andockstation: \"",?.~.name,"\""));" F) H: V3 U8 v$ h* M# D. l
else% x6 h& _% p. \- [% e. T5 x. ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ k; h0 k1 q8 A7 ]( b( a
to_str("in docking station: \"",?.~.name,"\"")); T9 n* x, V( |: `
end;! R* s2 @' u% I: e. N
else2 }: |8 u; D+ [
@.Destination := assignLObj[1,row];
# `4 x" ~( V) Y) R: X5 | end; & ]& x4 k3 [& W9 V
newDirection(@);
5 t- W! ^) S/ o; M @.HasOrder := true;
' @% }2 Y& H# n/ s5 w- [1 G end;# D/ ]! ?9 f% `& {* x6 i) Q2 N) T
end; p- B- v/ I3 e: a5 |
end; -- of the method5 U* Y) s3 P) l0 w
|