/* called by: entrance ctrl of the object 'track'
+ f6 U' @' i- s$ j: {8 x*/: y/ t7 L8 b5 }# o8 T3 `1 C/ C
is
4 I% o3 ^& ~' P o part, GlobalDistObj, assignLObj:object;row,Lan:integer;" ^& j! T8 Q+ V2 G3 |/ x1 A
do
* N/ c! }# ?$ m1 m Lan := rootfolder.Internal.Tools.AOLlanguage;
+ A0 q: \" V4 _5 T1 S/ m5 @( n if current = @.Destination -- else return( U* S, @4 `. C
then
! M: X+ D& f- r' ~- O3 { @.Destination := void;
9 K7 W5 r& O2 j0 B; f$ G if @.occupied then: k9 L5 Z, s: }1 Q
part := @.cont;
* i/ y/ a% C5 n. ? @.transpOrder := void;/ e% q7 g7 O" q S& E! J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 S4 k2 I+ K& m9 r4 q* y" l
@,root.eventcontroller.simTime);7 c8 J3 z- m# Q
@.HasOrder := false;
* I; V+ ]: D9 M* s @.DrivingHome := true;5 @" ], `: T6 a, C. n1 J
rgManager.tryToStartTransOrder;
% u6 N/ P! Y; p/ M& z1 |$ I7 L0 S. f if @.Destination = void# a. G# d% p9 D4 \! j c
then -- no transport order for vehicle @
6 ?2 S U/ p& I1 c7 y @.Destination :=/ n( B) F2 C5 _4 H. Q* u
rgManager.nearestFreeStation(@,track.~);1 R7 M9 p2 M. s
newDirection(@);
! c* y! ]4 V9 ^/ S if @.Destination /= void then
& [; }, b- i+ ~& { b# W; Z @.Destination.NumReservation :=
5 }3 h6 {( w: S, M9 H @.Destination.NumReservation + 1;
l2 j7 U) b! [) `# j# a end;
# S+ w0 r/ E( W' } @.CurrIcon := "drivingHome";
( n* V& ]; {; R8 _, P. B @.DrivingHome := true;
1 q& q5 ~2 O! \+ X end;5 C3 m1 p" I5 U7 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ m. a2 H7 P& Y* ^/ N2 H; Y& m6 Y
part := @.transpOrder;
, ]8 I$ a6 W- W3 v: { part.move(@);-- load part4 j6 M4 ]5 W4 j! B
@.CurrIcon := "load";* k- c1 A' D0 B/ s! A; y. ]$ D
GlobalDistObj := part.globDestination;7 N" V. j7 n# F" J2 p* }
assignLObj := rgmanager.rgAssignL;
) u `# |0 p' T+ U0 ^0 ]- Y' D6 g row := assignLObj.getRowNo(GlobalDistObj);
9 @; o: A' {! Q! V4 v. ~, B if Row = -1 then -- since 70
$ V0 t- u: v! @/ ^( r w: N$ T) K( H if lan=1 then
. D' h' t" L k% d+ c: @4 z1 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ _' m; X3 `; i
to_str("in der Andockstation: \"",?.~.name,"\""));
: |5 U# W, q6 R8 B' x else
, M( O* ~/ u0 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( [( x/ P# r' C! E$ X8 z! _( y to_str("in docking station: \"",?.~.name,"\""));
( o5 ~1 C. D+ T* R end;1 L( S5 b1 w' T, O% e7 t
else
, N2 W7 J/ J% o H" o @.Destination := assignLObj[1,row];
/ l! V& a" [7 n1 w8 H end;
! M2 o! O6 Z/ k- U/ i newDirection(@);. S* _/ Q# R4 }; P, X
@.HasOrder := true;
$ l+ x i/ [/ O7 m% k3 V$ T end;- Y/ U$ |$ o6 M M
end;7 ?- {- b; v/ y# D% l; z( I
end; -- of the method$ q. e& I9 j1 Q% O7 p8 ]
|