/* called by: entrance ctrl of the object 'track'
, d2 v; @6 E; F*/
# i- `, u8 E# b, h- U, t0 }* o Pis2 s; q/ W; z5 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 o7 _3 I& \7 p0 Q6 W4 F0 Bdo
# s% f" t3 L+ x2 S+ L Lan := rootfolder.Internal.Tools.AOLlanguage;
5 |$ R4 G: T/ Z if current = @.Destination -- else return( i) I: ^8 U5 n& b2 }. s; X8 {
then% U; I! [' h4 F# k. z
@.Destination := void;7 p" B% r' ~0 q, B* ?1 t" N
if @.occupied then$ ^& z4 Z! y* D, r e- N L) N, \
part := @.cont;
0 L# J/ r4 o# z1 O" A- A7 W @.transpOrder := void;9 `4 l/ |6 S! x# k" v% l" d0 o0 k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( s Q8 V7 h+ h
@,root.eventcontroller.simTime);
" N5 E5 G+ H8 b @.HasOrder := false;% z. \+ w2 m' |
@.DrivingHome := true;
' {3 b$ W! Q+ c5 s3 g rgManager.tryToStartTransOrder;! ^0 U; W% }0 E' G
if @.Destination = void
. i2 I/ c3 K5 ^/ t0 O. E then -- no transport order for vehicle @
# Q7 V5 s) @5 |! R g- n @.Destination :=
* h# X& o. s9 d% r rgManager.nearestFreeStation(@,track.~);
. p; N/ o1 u' A4 o& Y. U5 Q newDirection(@); / g" b. c! E6 b1 k/ Q- R2 g
if @.Destination /= void then- Q2 a" L0 a! F7 D8 X' S
@.Destination.NumReservation :=7 z$ @3 U+ V5 x. l8 N5 F: {" Y; Y; s
@.Destination.NumReservation + 1;! |) U# O; _& I, H6 e
end;
u% P( H7 I; w/ A- @; i, m @.CurrIcon := "drivingHome";
& o' t6 u# c/ y5 _' @ @.DrivingHome := true;- t5 t) F$ S0 h! A+ d7 w
end;" _! Q/ Y6 E: q& W% G# W8 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ g7 l. d5 k/ @7 D2 w
part := @.transpOrder;- i' B% R" _- j; }! C+ H% i
part.move(@);-- load part8 a2 V, y0 J8 |2 S$ ~" F% Y/ }
@.CurrIcon := "load";
, K, e$ o0 E# l; i: B! z GlobalDistObj := part.globDestination;
! @& ?; V4 y! d* J8 [2 S2 u assignLObj := rgmanager.rgAssignL;* e! G% Z1 U4 F$ Q
row := assignLObj.getRowNo(GlobalDistObj);
! h; g$ `9 t! E1 S! ^/ \- b8 b) u: i if Row = -1 then -- since 70: l7 k; U+ K% W* F
if lan=1 then
* i# t, u" U3 V' H( a; G) Y4 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 u" o T- k1 m. G
to_str("in der Andockstation: \"",?.~.name,"\""));: {3 M2 y) _# z5 l9 B7 c
else
! ^8 X+ @" u% W7 b1 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. w1 ` ~8 H; l. |# _& v3 f% o/ [
to_str("in docking station: \"",?.~.name,"\""));
( s' M" d J# i3 F _0 ^ end;
, s) I- d' E4 a' H8 A; W0 D1 Z else* ]- |! C8 N: L
@.Destination := assignLObj[1,row];# t( w4 b1 t5 T L+ Z8 Q; w- \
end;
& w/ S& Y% t! t- ? newDirection(@);
8 K/ O5 D, b- V% o; d @.HasOrder := true;
, a/ D! H+ @* Z9 k end;
0 S) C! b" K1 ?7 k' w; n$ B9 O end;
4 }/ u9 M) v) b2 q0 fend; -- of the method; z+ U' Y% U! z$ E
|