/* called by: entrance ctrl of the object 'track'+ q; h! r& x! [5 J4 i% c% h# y M
*/5 r- K* N; t" ?4 E
is
2 C; h% e3 H) ~+ b8 j; o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; r! I8 ^8 A3 N9 g& n/ fdo
9 h6 k& Z2 p3 v4 \% V# F1 g' J Lan := rootfolder.Internal.Tools.AOLlanguage;4 c n4 R% h. S3 X$ \8 h
if current = @.Destination -- else return
9 V' e9 x r/ r/ O9 ] then
% C9 {9 c2 n. ^$ [ @.Destination := void;
# L* G! v! I2 j X! t0 F if @.occupied then5 `4 }3 W' m: A% @+ M, v
part := @.cont; n9 q3 ~* [, r. P9 ]& O
@.transpOrder := void;
6 U0 p8 Z4 _# W+ t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
z/ @: R1 b0 M! U1 w @,root.eventcontroller.simTime);
* x1 ]# [- q q, U7 a) v @.HasOrder := false;
. ?; W4 }! Q+ M3 ^( w* b* P @.DrivingHome := true;
; ]$ p. r1 h( @" z rgManager.tryToStartTransOrder;
3 D* h& s, a$ Q( {; o) R) r if @.Destination = void2 P4 q! S& |( D2 k
then -- no transport order for vehicle @' j$ J# [# r% Z* k, o; ]* @
@.Destination :=. Y# U0 n7 q5 Q4 [
rgManager.nearestFreeStation(@,track.~);
1 w+ M" \9 {/ c7 y+ G. u g) P newDirection(@); / h( |& I8 W) K' C
if @.Destination /= void then
# _8 i8 t0 b' Z# K- K) k* ?6 m6 n/ Q @.Destination.NumReservation :=$ g- U0 \& g4 r
@.Destination.NumReservation + 1;' @& M8 M* F ?2 R( o* \* a$ e0 |" M
end;1 _% L: }1 {4 h& R& g, x
@.CurrIcon := "drivingHome";
* ?' a8 V9 [0 e2 z @.DrivingHome := true;/ _$ q2 B) h, R& y7 ? r
end;
, M9 y8 O& Q+ v6 {- l1 g/ L" u else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 E& `: y8 q3 ~" h4 `( |
part := @.transpOrder;: ]4 x! f5 D+ a; Y e
part.move(@);-- load part" B$ A: r/ z% B/ P
@.CurrIcon := "load";% }$ W r3 E& a- u( o j5 ?
GlobalDistObj := part.globDestination;
' R- C5 G2 x9 p A: | assignLObj := rgmanager.rgAssignL;
5 U3 n" k- N2 }+ @3 z row := assignLObj.getRowNo(GlobalDistObj);
6 @' s' T3 e, U/ u$ l if Row = -1 then -- since 70
5 ^1 T4 _& R S i+ K# f ^ if lan=1 then/ Z) r/ G3 p' j$ j8 f/ g2 ]: d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ {# a% T6 d" P/ i2 H" A5 o to_str("in der Andockstation: \"",?.~.name,"\""));
; U5 F! I) E( p ]& H else5 i, J$ Y& K" V* g0 {- A1 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ C# u9 Y! C5 E2 ~ to_str("in docking station: \"",?.~.name,"\""));
* o2 c* z' G) w* i2 z+ e4 G9 { end;$ H! L2 e% f; c+ I+ _
else. M' z! M4 `1 r4 Q1 j
@.Destination := assignLObj[1,row];' ]1 O8 d0 V! b
end;
& e! U" l+ a. S: R( z; ^" x newDirection(@);9 l+ l, J8 k& i* J0 }
@.HasOrder := true;8 o: k8 E a% F
end;
) J6 z" w# C+ r6 i, L. p4 n' k" o end;2 J" v# N* M" W, G
end; -- of the method
& }. |( v/ K5 J0 q2 W |