/* called by: entrance ctrl of the object 'track'
# f6 S {7 l: p2 k6 q*/
" d7 e* s5 y' `" B8 Tis
6 s/ [% N* \; a0 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;& Y8 ]9 ?) B) s3 Z
do0 a! W! F$ {, n/ U
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 u! S( h% h: I& J$ i if current = @.Destination -- else return# |4 K* q6 r4 j. L1 a; E
then
y. v' J o/ z% {/ x L @.Destination := void;
8 w7 j8 h( p" s- f if @.occupied then
' x' s( }, _4 s# A" j& P part := @.cont;2 q- P* a4 s, \ |
@.transpOrder := void;+ W% n; `* P4 Q0 j7 O! z3 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," K8 k8 [. S% f. i. X5 l- K. f
@,root.eventcontroller.simTime);
# Q% \6 a Y$ B2 ]% e ` @.HasOrder := false;
+ s: p9 T4 e! M @.DrivingHome := true;
' v. ]! b" c0 A7 Y. G8 g: w rgManager.tryToStartTransOrder;
1 l8 S. C2 d1 x. t( Y V if @.Destination = void
% W4 x. U# K7 ]" {. J* P7 j0 i then -- no transport order for vehicle @
- D- H1 B2 U1 P5 u. k @.Destination :=' z* q) P% H4 \# p) m2 U2 u
rgManager.nearestFreeStation(@,track.~);2 s! ]& i+ e) B2 i4 L
newDirection(@); % E3 b1 U1 T: I& ]; S; l" j. E
if @.Destination /= void then8 y9 B3 }! R q, r4 Z7 [
@.Destination.NumReservation :=
. D% F+ n2 z U. ~+ w @.Destination.NumReservation + 1;
, B: l" X6 A0 c, Q. L- r/ P, t' y& J0 A end;
8 S3 b8 x) B% ^; |6 _$ e @.CurrIcon := "drivingHome";2 V: }% T! G4 _$ B9 y
@.DrivingHome := true;
* u: U; n1 S* i* o4 B6 _ end;
3 {6 w+ e( q" s1 o6 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# o7 m1 v0 h# L a part := @.transpOrder;
& e) x$ k9 V; u. M part.move(@);-- load part( R0 B7 F, ?/ {8 M2 q/ B
@.CurrIcon := "load";
8 E5 j. t: I2 \) B" d& o$ o' e$ U7 m% r GlobalDistObj := part.globDestination;- G3 W" j/ o" y" v
assignLObj := rgmanager.rgAssignL;
- {& V' v& M9 Y, V! J row := assignLObj.getRowNo(GlobalDistObj);
/ b' V7 Z, S& E. a& R2 D if Row = -1 then -- since 70 t" T) r i$ @7 R* a+ i
if lan=1 then
% d$ g6 A( d6 X) y& g( k' n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. F! v( `; r6 W' D to_str("in der Andockstation: \"",?.~.name,"\""));$ ?/ v8 l3 Y5 i( u) n
else ~" P, t9 L, P; _- P$ `* O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; v! `6 T0 ~& c# D: j to_str("in docking station: \"",?.~.name,"\"")); 3 U+ L; b8 e/ Q8 X3 a
end;
9 L) D2 h1 i) \. a6 f! D# X else
3 p8 Q7 h3 p$ u# F6 y* u; a; e @.Destination := assignLObj[1,row];) C% P+ Y! x- Z9 ?$ C6 [# n
end; 4 B6 K2 W& z0 s* f. H5 x: ?
newDirection(@);
5 W- y* W( j9 E+ F6 n j! p @.HasOrder := true;$ f5 E$ X+ N' @ T5 ]2 K) ?& @& n+ c
end;6 e0 D* j( i* X! {; c/ W
end;" R% J8 C2 @/ \2 B
end; -- of the method/ t+ K9 V( M* u: N* K
|