/* called by: entrance ctrl of the object 'track'! Z; H+ g8 h. \! o* r0 H; B
*/7 s- I- I. k/ @5 h9 W
is8 W G7 j2 e2 t+ n, i$ v, ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 F" Q& e$ U0 Q! x9 {
do
& e1 K6 y, i9 K9 l2 b) Q9 k Lan := rootfolder.Internal.Tools.AOLlanguage;
4 g4 B k' ], ]- {* c( W if current = @.Destination -- else return
7 \ W4 n7 T# ^+ }$ G3 d then
4 ?; u8 |0 @" A: i6 j+ N" _ @.Destination := void;1 q3 z1 }% |6 K' i. Q: C1 z
if @.occupied then5 B2 r8 @7 y; G r1 Q! Q
part := @.cont;
$ m9 ~# ?4 r. S8 l( T; W7 @ @.transpOrder := void;9 S- g2 C, f" z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, m9 N* C' w# A3 G% O
@,root.eventcontroller.simTime);
, Y2 c8 u( `& I5 J4 q: O/ } @.HasOrder := false;; l5 Z0 J( p% P# L
@.DrivingHome := true;
2 K0 S/ Z* K! h) |4 c; b rgManager.tryToStartTransOrder;
: h M( ]8 d9 K& R# e+ F& N9 _8 d if @.Destination = void- z) C7 c, g0 j. ^
then -- no transport order for vehicle @; ^ \. N& v4 U
@.Destination :=* X; V' r5 X4 A# Z
rgManager.nearestFreeStation(@,track.~);
) b: L( G2 r0 v* n newDirection(@);
/ k$ B) A. F" N8 P4 k if @.Destination /= void then/ t$ z5 c8 f" D( }1 F! U2 M) d
@.Destination.NumReservation :=( i. A x. J1 _* R% ]1 d0 e4 Y
@.Destination.NumReservation + 1;- b; Z; m5 ?- b6 M& @' D6 D K$ S
end;
) o L2 o) i: _9 k% Y0 ]+ y @.CurrIcon := "drivingHome";9 v& n. `/ t. m
@.DrivingHome := true;0 T9 ^% C1 @$ H# N% f! Q6 @
end;
! ~) @# R! n$ t" p% B$ z' _( Z& p else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 P6 E3 h9 e0 D' k
part := @.transpOrder;
- p8 p/ D. \3 \ part.move(@);-- load part. A# N q4 s$ Z! {
@.CurrIcon := "load";
" R' R# v7 y n4 q; M5 j- h" q' }! t. g GlobalDistObj := part.globDestination;2 \1 l) I5 _- a& r# f" `
assignLObj := rgmanager.rgAssignL;
# o# K4 T1 S# s" u row := assignLObj.getRowNo(GlobalDistObj);( c9 C d& k' e
if Row = -1 then -- since 70
8 K( y3 v9 R% d0 x if lan=1 then, V1 ~) ^; v: y# m. U, @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. u( v, y1 G# i, d to_str("in der Andockstation: \"",?.~.name,"\""));) Y: O0 k) U4 w7 q. c: w, r
else7 t/ L) k. {$ p. U; o1 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ o3 e2 F2 e. j+ Z: x+ v' j
to_str("in docking station: \"",?.~.name,"\"")); ( ~, W& R" O+ N! ^% X: w
end;
# b7 _7 _+ m2 S6 o$ a8 a else G( B0 E- h3 x( L5 ^- _
@.Destination := assignLObj[1,row];
@2 D6 [* M/ j+ F- F end; 1 s! E6 U3 o5 j$ Y& J2 b
newDirection(@);: i, N( J, y: R9 Q
@.HasOrder := true; a4 B, b3 h, ~; P& o5 n/ I
end;! z* L( Q; c; M) j9 T6 z
end;
7 H1 B" P0 V4 f7 p# f. g, kend; -- of the method @% S- _4 j: H# S" p1 ]8 U* V
|