/* called by: entrance ctrl of the object 'track'" K H7 ]+ g4 O+ ~) ~8 }
*/
+ m C% }1 V% W6 l( I! i2 Uis
) b6 ?) D" T2 Y! X! o# o: @+ ]7 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& D6 G4 H* v3 e1 G- c, ydo
9 x% G) u8 w/ ?% i* k Lan := rootfolder.Internal.Tools.AOLlanguage;
8 `9 h1 A" ? `6 {& {" ?! Y1 l if current = @.Destination -- else return: L. o: R; l) r6 N- m
then
8 R$ r4 h$ ]: J# L5 ]: @& O) |. x @.Destination := void;
& t; l, ~7 \" v" e$ O' c if @.occupied then
% }& N6 w: E' l( t7 B/ K* Z" l; ] part := @.cont;1 l& S# ?9 G0 ~5 ]
@.transpOrder := void;
( p" e0 }$ `1 D3 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 R1 D( D4 ?$ C5 ^6 t6 k, s5 s
@,root.eventcontroller.simTime);
+ O/ }6 Y+ p' A# t8 A* D* S0 r8 H @.HasOrder := false;" F1 a1 h$ @. G$ J" x9 c
@.DrivingHome := true;
- o3 o P. E+ r1 l rgManager.tryToStartTransOrder;
+ ^) m1 K/ I: z- F if @.Destination = void
U2 b8 x" w3 g/ p. c then -- no transport order for vehicle @
3 m/ ?; G# p5 E( R/ S" X @.Destination :=
: O# E7 y* _/ z3 L rgManager.nearestFreeStation(@,track.~);
! ^' Y' f+ r. W( o4 r9 R newDirection(@);
' [, ~4 e2 Z6 S9 C5 ~5 H* U4 J6 d; U if @.Destination /= void then
8 C% n# x& K- R$ T% @0 f; V8 ~: b @.Destination.NumReservation := @' a0 P: z- |1 V/ p
@.Destination.NumReservation + 1;8 f& M$ J0 e4 W, R3 N
end;) m( i9 W- Y. d8 E
@.CurrIcon := "drivingHome";5 g9 r' F5 L5 c; a
@.DrivingHome := true;/ x' ~# h( U& ?) I
end;
2 l Z B5 t7 f. y! z( ]* F" j else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ u5 E, e( P/ ~/ ~/ {' k
part := @.transpOrder;0 \- A# b0 L# M
part.move(@);-- load part
+ J5 D8 h1 Z) o# Q; x6 o @.CurrIcon := "load";
1 \( Y4 n! v8 a# Z4 t$ p GlobalDistObj := part.globDestination;
' x! g, ~0 x2 x assignLObj := rgmanager.rgAssignL;
8 o3 k: |1 D6 U' C% ~: {! H row := assignLObj.getRowNo(GlobalDistObj);
5 l4 [ C- s# v if Row = -1 then -- since 70; W& f! J; r7 Q# p7 j
if lan=1 then' u1 s4 `2 y; ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# m) D* P) O3 N, g. s3 q4 y to_str("in der Andockstation: \"",?.~.name,"\""));& O. Y% G5 p+ K9 |& E/ \9 y9 [; y
else, H0 L! O& o& S u, P( n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 Y, {3 s. n4 M3 |" [
to_str("in docking station: \"",?.~.name,"\"")); ! y' y3 K& D9 t
end;
`0 h; v. l- ?; Q4 ^- N8 h else
& h. o. b: s2 p; }1 F! l @.Destination := assignLObj[1,row];
n& G' `% D0 }! A4 E- t end; 8 n5 Y3 m3 T) E* \
newDirection(@);
- P0 u7 u% {9 K1 L- ?" ^ @.HasOrder := true;
, g: Z) L; ^$ @6 W end;
4 u* V/ e( k- Q9 o' Y end;
. ?$ `: h1 A3 f# U! \0 [0 mend; -- of the method9 ~1 b, R, z9 R% P. J
|