/* called by: entrance ctrl of the object 'track'
( ?" W. ^! ~0 d$ h, M( ?*/
+ _4 \. {: X4 X7 D& jis
+ [7 d- O, z5 k: K2 v) n part, GlobalDistObj, assignLObj:object;row,Lan:integer;) n; ?: l& w- h: e" M) P# W" L2 B
do
' F/ t. I4 N) ], W5 T5 w) r1 q Lan := rootfolder.Internal.Tools.AOLlanguage;: T- k0 a B) p) x& `, Z, G
if current = @.Destination -- else return
* V9 U7 p8 X( m) V" E( @ then! q. M6 u/ M7 D6 R+ ~$ h9 k/ q
@.Destination := void;
! K: r1 |8 T& t if @.occupied then
/ D7 P* ~, R" n* `, _0 V part := @.cont;2 L' G# K1 P5 [1 h2 _ `
@.transpOrder := void;
1 W% }8 Z8 H# _' L+ ~; i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- Y6 y4 f+ M, h. _3 b @,root.eventcontroller.simTime);% s& l1 x% n8 S2 U) q5 |/ B& Y. y
@.HasOrder := false;
$ V. W/ ?0 s G" I, b- e# ` @.DrivingHome := true;
( N$ C0 A6 ?: W. @ rgManager.tryToStartTransOrder;
! q1 j/ e& _ B( q4 a% D8 @ if @.Destination = void8 k6 h% |9 K/ _* X5 K
then -- no transport order for vehicle @
" b0 X' p, l+ |. l @.Destination :=
; w8 U S; w( E rgManager.nearestFreeStation(@,track.~);
* N) z% q- E8 T/ J( T& ?! x newDirection(@);
' f8 D+ @( z- J! Q/ t$ [; r if @.Destination /= void then
. D2 z" \" n1 P: r @.Destination.NumReservation :=
2 ?) [) W7 n+ i! z @.Destination.NumReservation + 1;' D/ e2 S5 Q; ]/ t
end;
* x7 A5 y4 r' X, n4 G" K' _ @.CurrIcon := "drivingHome";
3 l, Y% i& Z: M8 @% D3 h) ? @.DrivingHome := true;$ ^8 g6 B, o5 M4 q R9 s
end;1 X; e4 Z) s& R1 }/ e9 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( {: P7 B/ U6 V5 [1 D6 \$ @. \
part := @.transpOrder;# k0 m! M! y9 x$ V0 l: ?# y/ x
part.move(@);-- load part
+ K4 b; ?' H, C+ I @.CurrIcon := "load";9 I- `4 x6 W3 g8 o- h/ j
GlobalDistObj := part.globDestination;
4 L1 A5 J9 o0 `) r: a6 J I assignLObj := rgmanager.rgAssignL;
8 S: L1 |- G* {/ r$ O/ N9 Z6 ] row := assignLObj.getRowNo(GlobalDistObj);$ C6 w( r+ H/ k
if Row = -1 then -- since 70
# n6 Z/ K1 m" t2 T if lan=1 then* ^( V1 c# K! l2 j! N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 a# L5 h7 @) ^" c- I
to_str("in der Andockstation: \"",?.~.name,"\""));" `% T- E( z& J5 s
else) r( J) l8 A% u! d: ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' @ |4 o1 q- `" G' P$ s( u/ X
to_str("in docking station: \"",?.~.name,"\"")); 0 |0 z- V" i. u+ B/ f
end;
4 b& G3 z! V* u2 K' K+ C else
b$ ?& t" A4 t- l9 U @.Destination := assignLObj[1,row];
; }; G5 M3 C8 E2 J$ w. [: n end; $ F9 a0 b5 x/ T' C4 x5 ?0 w& `6 A
newDirection(@);
5 N& b, _0 P6 i0 ?/ {2 a5 e0 i, O @.HasOrder := true;' G; E# I7 R. w* x* Y# n7 B
end;
" P: Q* f9 d2 V' _) [, u end;
& O0 y. r5 M5 C. ^ U) ^, o+ send; -- of the method* e0 X+ `' z0 b6 Z* _% `% d
|