/* called by: entrance ctrl of the object 'track'5 q( p% |9 `' e1 E
*/+ N5 @0 Z5 M7 t' N) [& D/ X
is
' a) q% u# l; a/ B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: a: T" C4 Z& F1 ?' [/ ^do
- s0 V0 I' ]: ^& V Lan := rootfolder.Internal.Tools.AOLlanguage;
- ?6 H$ ^) a2 x* s: m if current = @.Destination -- else return
; `" n8 j$ D" t0 l# h K then
6 U" f4 E s/ f8 N7 d" R0 I @.Destination := void;% S% C4 i( \* Q
if @.occupied then# g: s. E X3 }% [. s0 ~) A( j
part := @.cont;5 |" y4 ~5 c$ b$ @9 }. V& y; t S
@.transpOrder := void;
% [+ K6 Q# {* J8 c' [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, {3 j$ O# p {% B5 e" q# D* E5 F @,root.eventcontroller.simTime);! [2 n4 Y2 [' n! H
@.HasOrder := false;: W9 {5 M" v+ W+ R
@.DrivingHome := true;- C& e7 J' f+ ^! k2 f. z0 }
rgManager.tryToStartTransOrder;
5 x! q, o7 ^2 v if @.Destination = void/ U t9 b; s4 X* r$ ^! B0 h
then -- no transport order for vehicle @
2 \( Q* J A/ L4 ~; }) Y* H' R' v @.Destination :=
! r U* N& J: B2 P rgManager.nearestFreeStation(@,track.~);
3 c2 e8 s0 U$ |8 N- ^1 i( k$ k newDirection(@);
0 K9 P& g( q! B% w+ p) O; a if @.Destination /= void then& @. a/ @3 ^ w& I6 ^7 \
@.Destination.NumReservation := T: p$ I) W7 G) p
@.Destination.NumReservation + 1;) s0 R. }1 l: B
end;- L3 Y6 C4 }% c0 @& o8 z/ B
@.CurrIcon := "drivingHome";* ]' M( r5 L0 R. n, d- Q! s$ C. A
@.DrivingHome := true;! V7 o+ P3 n) o- Y' d
end;$ j* H1 a' a( K/ A$ {5 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ~; D$ ]2 C5 ]! v( i" q" [
part := @.transpOrder;
( V9 ]. N6 l- T part.move(@);-- load part
+ n& D8 Z; B6 M @.CurrIcon := "load";
8 \( b7 S5 D$ s! V1 A GlobalDistObj := part.globDestination;/ A0 ^% o* ]' ]" {, g
assignLObj := rgmanager.rgAssignL;
) v! s2 U0 N) n3 n5 F row := assignLObj.getRowNo(GlobalDistObj);7 R4 A( m- I' U) [$ A
if Row = -1 then -- since 708 c; R! p8 P7 m* \
if lan=1 then% B& U! r5 I% d1 s+ e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 Z r) e9 e; v5 @7 V+ K
to_str("in der Andockstation: \"",?.~.name,"\""));
: O0 ]1 V- E3 `, | else7 c: ]( k: _7 W# r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 A( ?. V1 u' \ to_str("in docking station: \"",?.~.name,"\"")); 7 z8 n+ o. \. W: o8 Y
end;+ ~5 {7 H- K3 e! I9 h- y: k
else
4 T1 D, P$ k" ^3 f @.Destination := assignLObj[1,row];
; l$ d$ C! A4 v' F/ z* G' y end; 3 c" t4 v5 q( V$ j, c
newDirection(@);
) V. v* A7 z& f5 C( T! {, I @.HasOrder := true;7 @) m2 @$ o! w/ G9 M* l
end;
: v# p$ }- i% ?- A' X* K0 I end;
% m" M9 \$ a9 P% J+ oend; -- of the method' u$ ?) ^8 F3 G1 l% f
|