/* called by: entrance ctrl of the object 'track'! d. x, I* ?: x, [1 Y
*/
% p3 l% A# `) f8 ?5 lis5 j- k5 O5 u, N1 [4 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, w( [# n, d' g. H/ Cdo0 b2 o. V2 S) ~- r7 P
Lan := rootfolder.Internal.Tools.AOLlanguage;. t* _6 x( K1 ]1 ? {2 m
if current = @.Destination -- else return# r _" k) V4 N* [& O4 m' ^* S; ~
then
% G4 V$ w" D0 W% }' i9 [' ?/ b @.Destination := void;
9 p+ s1 N9 g- d1 A. @1 u/ _ if @.occupied then# c4 E4 @7 ]* x
part := @.cont;3 h# h0 L$ s- Q5 J5 }. T1 j
@.transpOrder := void;
( `( r. M0 @4 k- [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( y- ~) z) ]! j ?2 B; f
@,root.eventcontroller.simTime);. L1 S9 P6 K. ?5 o! H) p
@.HasOrder := false;! ~$ q7 L Z* E* j7 m5 v B
@.DrivingHome := true;
4 V6 [/ ]& z. o6 F) \ rgManager.tryToStartTransOrder;
+ v3 ?5 L' ~2 G' @9 } if @.Destination = void$ N: n5 l% I% m
then -- no transport order for vehicle @+ t$ `& W$ e2 a1 m) H: _: i
@.Destination :=8 O7 t3 O$ \: X! V- |* f; E1 N
rgManager.nearestFreeStation(@,track.~);7 _2 P" `% q) A/ H8 z
newDirection(@); 1 d- h* d; X& ^( f$ B" O
if @.Destination /= void then
7 M0 q7 C4 _2 Z @.Destination.NumReservation :=
4 ]/ W _9 f: J. X: [ @.Destination.NumReservation + 1;
) q9 }) c2 F0 C( {3 | end;
3 J [) R% ?) ^2 { @.CurrIcon := "drivingHome";
$ i+ `; Y2 f, h3 v) H8 r @.DrivingHome := true;" u# q" O+ y# |, d4 h
end;
. A9 c# E" D3 h) p& l0 [3 ]7 t- l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
L* j& X1 F7 O" N) N part := @.transpOrder;
- n: G4 ~, }4 w part.move(@);-- load part
; \" m U% N s+ [7 t/ w @.CurrIcon := "load";7 a4 H" ^, b, d/ a& r- @( g7 G
GlobalDistObj := part.globDestination;
{0 w" g0 N1 V% Q assignLObj := rgmanager.rgAssignL;
: b9 Y$ U5 p( u: h: v/ j+ ? row := assignLObj.getRowNo(GlobalDistObj);
0 t1 q% A4 Y6 n6 _ if Row = -1 then -- since 70
0 }% c9 l) O2 u if lan=1 then
% g6 Y, \ h' X8 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: Z& f/ N/ u L
to_str("in der Andockstation: \"",?.~.name,"\""));
8 r1 Y" ]0 l" I! K' a else
: q% l$ ]/ E5 Q( v9 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 u4 ?* U/ H/ g to_str("in docking station: \"",?.~.name,"\"")); " I+ v+ e8 g6 e
end;
; K+ I3 @, y9 e2 L0 ]; R else
+ m7 X j5 `* ~& [/ t* k @.Destination := assignLObj[1,row];8 k+ S6 i$ w! v, F) z$ a0 c
end; ; a2 F9 P( c4 |9 y
newDirection(@);$ F& F- X6 Y+ q6 _. N( V" g
@.HasOrder := true;
) T* r* w2 b/ i' U5 |# } end;1 p# w" }5 l7 O# O: z( ^; V
end;8 X! R' G0 c3 Q: Z) J2 E- y
end; -- of the method
0 l5 i1 ?9 e. G+ N( K |