/* called by: entrance ctrl of the object 'track'1 c+ }. L8 w6 k( l- ~' L
*/
% C2 y; a1 m9 F& e1 x& h* G& U6 z& `is
. O& F- w3 ]' |! u e part, GlobalDistObj, assignLObj:object;row,Lan:integer;# c" Y; W/ ?( c5 n* c0 ?' e
do! U0 Z3 j- N* u: r0 g) L' M
Lan := rootfolder.Internal.Tools.AOLlanguage;
: A1 R3 Z$ m0 P, `6 U" M* D if current = @.Destination -- else return
4 \* X! P3 U/ P4 g5 L+ r/ x. C then
4 Q. j4 ?: A5 d% p& g' r @.Destination := void;
# Z. X4 w" }& M0 u! A if @.occupied then
4 B2 H0 K2 S, w% X x part := @.cont;: @* ~8 d" W! D/ F5 R/ ~
@.transpOrder := void;
+ U. ]9 H2 n" \) ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 c2 B0 g& x- V* g" J! X& |
@,root.eventcontroller.simTime);; N4 ]3 w, L( y: `( ~
@.HasOrder := false;$ {* r2 Q5 t' U% e( A! g. w* g
@.DrivingHome := true;
' W- ?* h G) q9 p3 E rgManager.tryToStartTransOrder;( w; W( h+ c8 F; {: u8 {
if @.Destination = void
' x c$ X8 e" Y5 m) N: u$ m then -- no transport order for vehicle @
/ [& u( ^( i' T8 |: A' B2 } @.Destination :=
) G' ^- j% J/ |$ }% J+ } rgManager.nearestFreeStation(@,track.~);
9 l4 B! Y- _, g6 { newDirection(@); 5 G6 ?% O z I" I( W$ o' N, z2 r8 Q
if @.Destination /= void then
3 ^- T, n. U+ d- G @.Destination.NumReservation :=
- W; W) U4 m2 c$ I# n+ B) p4 M @.Destination.NumReservation + 1;1 \8 z1 v1 Z! R w R, P
end;* M/ I& z/ l) ~6 c
@.CurrIcon := "drivingHome";
5 F+ U" l8 y+ {) ?/ k& S2 B @.DrivingHome := true;
4 z1 b; u7 e6 A2 k) @* b; ?2 \ end;
8 F+ _$ t$ C' l# v, G7 v0 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, b: A+ V- u0 m* X i6 b; V part := @.transpOrder;
3 {) v+ q* w) W6 `- N9 t8 n1 e part.move(@);-- load part
$ p4 f- A" v. u; z' c/ o4 a @.CurrIcon := "load";$ |' _' g. m, s
GlobalDistObj := part.globDestination;
4 T, v" e7 ~9 i# }7 e, l assignLObj := rgmanager.rgAssignL;
% h; o2 x0 Q! u- u0 g L2 k row := assignLObj.getRowNo(GlobalDistObj);
' q' j- |( z* A8 \3 _) u4 V" o if Row = -1 then -- since 70
5 w, H& J @: v7 Y# _% @9 ~ if lan=1 then% M/ [; e- g- `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& \0 J" Q& ~+ N to_str("in der Andockstation: \"",?.~.name,"\""));$ h$ U" G2 d& f8 S
else$ ~7 V9 s$ {2 S, C1 `; @0 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, Z* W/ d, z% J. V- w to_str("in docking station: \"",?.~.name,"\"")); ! L2 y) t# _- p" b
end;
W/ S/ A" D( x7 s else
# v& M# w" a) o6 Z) T @.Destination := assignLObj[1,row];
$ i8 d; b! i1 ^8 u- n( N end; 2 s* a; j; [( o! {$ \' D
newDirection(@);) T2 R9 a' o9 j
@.HasOrder := true;
) T* i$ W# s2 A end;/ S# s" d- Q/ `9 @4 j
end;0 M3 w0 m* G; w6 C+ y
end; -- of the method; o2 D) ?" p' I- o2 ^
|