/* called by: entrance ctrl of the object 'track'
) `& q2 j, _5 A*/& j" B0 ~. r: K: T* s
is
* o/ Z9 n3 ~6 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;. M. ^( R# H3 x7 n" \7 a1 z0 N; ]
do+ Q# D, \9 |. a, \8 g
Lan := rootfolder.Internal.Tools.AOLlanguage;" {9 R$ c8 _. I1 Y) ~$ `6 @: M
if current = @.Destination -- else return
2 k1 h$ a* j# U: T; j then
# ]" h$ e3 B) d" {) ~* R9 m. U @.Destination := void;
- }4 k1 Y7 ~8 B; g7 F0 n, T9 G$ C9 ? if @.occupied then
8 D7 d& M$ ^$ t" ?2 b- K6 f part := @.cont;: E) C9 [* Q8 S8 }' N1 G
@.transpOrder := void;# W0 ~1 _1 m' f# L3 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 \( x4 T1 _# D" z0 D4 Y5 @
@,root.eventcontroller.simTime);
! m; Y( }3 v7 @, D( F$ V6 P @.HasOrder := false;6 a& ?# H& g! i ]; V5 T
@.DrivingHome := true;
3 Y6 |/ _; R1 f3 C( e6 `% v+ Z4 x rgManager.tryToStartTransOrder;( x" B7 u% d. N" v9 V0 i X
if @.Destination = void
8 d: p) C) t7 {4 T' _% s' W then -- no transport order for vehicle @! O3 a! t% \ y) v
@.Destination :=" X8 h5 v2 x( a6 G3 Z& |
rgManager.nearestFreeStation(@,track.~);
8 y0 L+ O! c0 x8 x newDirection(@);
* z0 Z5 m! t3 R, }$ G9 a if @.Destination /= void then
! c3 s( T2 z- w( c& \; K @.Destination.NumReservation :=( n% }6 `( s3 k( K) ]5 L( h
@.Destination.NumReservation + 1;
/ [3 F# v# l: _, W end;( l4 p+ ]1 e1 |
@.CurrIcon := "drivingHome";$ `. k; d$ @1 d& l! ?/ O' K
@.DrivingHome := true;7 O( f4 y- ~+ o* z+ _
end;! T: h! K k2 S* q- m; A, b- @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ]7 l6 `* z, W7 v' o5 E part := @.transpOrder;
/ n. {0 S4 z3 s& t) j* o# Z part.move(@);-- load part" s0 u e& ?" {" O5 n# f" C
@.CurrIcon := "load";, e8 P4 Z3 U" e+ A, T2 y
GlobalDistObj := part.globDestination;
) _1 U+ R1 ~* B: h) l( u assignLObj := rgmanager.rgAssignL;
7 I m& X s' L. k- T6 }* Q row := assignLObj.getRowNo(GlobalDistObj);
0 ]; ]$ y/ q6 B( H: _ \ if Row = -1 then -- since 70* i7 t1 i8 N1 z+ l0 k
if lan=1 then
% U, x+ P A9 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% [5 {% G* M8 P: i6 W8 k
to_str("in der Andockstation: \"",?.~.name,"\""));# ?; I6 H% M/ E5 w" r
else
. k' m4 Z" L- ?; r; c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 z" _: H/ `5 u& I8 _8 V5 I! Y to_str("in docking station: \"",?.~.name,"\""));
" f! t# G$ ]( B; X" k$ K end;
( n3 D! Q( n7 X. y& n4 @/ t else) a) X. H1 I, e9 g
@.Destination := assignLObj[1,row];
5 `9 L3 k+ |. n end; / E/ d; l# l9 L6 Z, H
newDirection(@);
/ Q6 P3 P7 j) V8 n/ D @.HasOrder := true;
$ ~ D7 q% J7 B' V5 {. a N& y end;
4 ~/ p c1 T: i: I5 `) @ end;. E4 P+ e0 \; U% z
end; -- of the method
) U7 |0 Q! o7 B _+ O0 [ |