/* called by: entrance ctrl of the object 'track'
1 z* z# z' x( c7 k) {7 t2 j*/+ A; k# `: [7 s
is
J# }2 s; p/ o# Y/ w part, GlobalDistObj, assignLObj:object;row,Lan:integer;" o6 V$ c; e6 T
do- P* w" w% Z( t! Y/ n5 {5 o( t" A
Lan := rootfolder.Internal.Tools.AOLlanguage;( y S: ^8 i: U% c0 C
if current = @.Destination -- else return' Q' j% h( N9 c* Q# b. G
then' A; n5 l! a" O- L$ u
@.Destination := void;
5 J9 Q* n: T- y8 @. p* l, l+ u if @.occupied then. k# S" e# F4 h! }" e
part := @.cont;# `8 a" C/ u; Y
@.transpOrder := void;! J$ V7 H% i) Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ c2 c) ]4 t$ @ d' s8 H6 ]
@,root.eventcontroller.simTime);
" _' N# {4 F) k& ~- @, | @.HasOrder := false;$ l2 `3 q. R" R7 w
@.DrivingHome := true;0 L# ^$ ^5 S" x. a; t
rgManager.tryToStartTransOrder;
' e7 n U* [" b if @.Destination = void& ~5 G% q8 s( _4 ^1 e- r
then -- no transport order for vehicle @% x- V: x7 f8 a
@.Destination :=$ E1 x+ V% ~4 I+ f0 I
rgManager.nearestFreeStation(@,track.~);
. `, k& u9 j& x! ~0 H' k) J& ~" @/ c newDirection(@); 6 j2 B j5 z! e
if @.Destination /= void then
) P! \9 F+ ]6 X3 D; M, A @.Destination.NumReservation :=1 h! l* _* q! {! ]( Z- p+ z+ s
@.Destination.NumReservation + 1;
) P7 {3 V* K: | end; L; _3 I7 \2 Y7 `% R- E
@.CurrIcon := "drivingHome";
' j: e( h I3 c6 x5 j @.DrivingHome := true;2 y! J7 o9 |2 v) d8 K2 r( t
end;2 [. v) q% w# a4 l! s% |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% [) G) ?2 i* \
part := @.transpOrder;+ u# ?; F9 r- }+ F
part.move(@);-- load part
% @6 j# ?3 ]: b7 a, [ @.CurrIcon := "load";
' F' S$ g; t" Z9 M# J GlobalDistObj := part.globDestination;/ I1 g; _! l) @' O( @4 g, D2 P& c
assignLObj := rgmanager.rgAssignL;
, W" Y' Q. a8 |, i3 B" C y4 I row := assignLObj.getRowNo(GlobalDistObj);
3 u& R+ `; @7 ~" a5 } if Row = -1 then -- since 70
$ s6 Z4 I/ X Q* a" o# L9 P) _. S if lan=1 then5 E9 X( C1 J' \# j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 ]+ P0 H3 E8 q$ d7 t& p* F to_str("in der Andockstation: \"",?.~.name,"\""));
# F! d, |3 G& V1 @/ b else
( S% M3 W/ J9 K& Z5 e: o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! n+ x: G; @+ v
to_str("in docking station: \"",?.~.name,"\""));
) C& l- J; d# t9 }$ c) e3 M# h end;
2 r- O2 z! V& r. r1 T; N6 ~/ k. h. o/ L/ g else/ `9 L2 L, a9 \; N2 |5 R
@.Destination := assignLObj[1,row];% c8 N- e7 C( H3 j( @; V: |
end; % M# z# {6 j8 q$ \: r5 o
newDirection(@);$ i% U5 H6 w3 O: S. B' Y
@.HasOrder := true; g& Y6 ?, o7 i' h$ J9 E
end;
/ `% _. h, s n end;* N' l: _9 V- _* K: b* Q) `3 v- ?
end; -- of the method
) _$ [( Q1 U) t7 x6 s: {" r7 D |