/* called by: entrance ctrl of the object 'track'
0 Y5 r- {1 K7 Z5 h" v*/
" ?& O0 R/ l8 [8 iis
C9 Z9 t9 B( e7 n4 ?$ x3 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ y: o) C. ?. K, }: L- [2 J2 pdo6 Z$ K. r3 a. O* Z1 I4 {* Q- W
Lan := rootfolder.Internal.Tools.AOLlanguage;1 m: H l/ }7 @7 R# \
if current = @.Destination -- else return- b# r8 `% e9 y: K. s/ m* ^
then1 h. O# E" F: K! O" v! d G
@.Destination := void;
% _2 x( }% N& D3 I' b if @.occupied then; |$ ?" s5 f. V: t" C# V# A# j8 s
part := @.cont;9 j4 ~. V# j/ n" a. G M
@.transpOrder := void;
) L% b8 Y: G& _" ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# d* F. S6 i8 f @,root.eventcontroller.simTime);
5 ` M( R1 c5 ]# { @.HasOrder := false;- O0 K5 R* x" y6 D6 W
@.DrivingHome := true;
' n( q$ d8 I7 v$ x" Y0 t! A5 w9 t% n rgManager.tryToStartTransOrder;
& ?2 S; n: H5 l- r% w if @.Destination = void b) I2 |) d) m% X+ j# V
then -- no transport order for vehicle @3 G" S5 I' ^* x. S% _: |) f
@.Destination :=
0 w* b5 J5 C2 ~6 G rgManager.nearestFreeStation(@,track.~);
" s5 h* i8 t5 I' j! d newDirection(@); : G# \% G. U- s
if @.Destination /= void then* l9 V5 X8 D# O( S5 l& `
@.Destination.NumReservation :=* G8 c' k C/ i# [
@.Destination.NumReservation + 1;
3 }6 e4 x4 M" W end;- |+ J9 }5 |" N9 f5 E
@.CurrIcon := "drivingHome";
* D- `3 b# v8 E @.DrivingHome := true;4 q l# j4 s/ b: y7 g
end;
6 p" ^8 Z0 L6 r# u$ X; P) F8 T: z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 z2 c) h$ i/ S+ r8 g part := @.transpOrder;: S8 ?& ^9 S! x8 y( ~* Z
part.move(@);-- load part$ Q1 t+ x% o7 j
@.CurrIcon := "load";
# Q# a4 P$ Q! K7 V1 F GlobalDistObj := part.globDestination;9 ` S8 i2 P- R$ C/ O4 p) ^# K
assignLObj := rgmanager.rgAssignL;
J" O: F! g2 v# u7 g7 c4 B row := assignLObj.getRowNo(GlobalDistObj);
$ Z7 K' v% X( _0 J* w2 ~3 L M if Row = -1 then -- since 70
( j2 O) `" d( V9 I9 Y b. w, x/ } if lan=1 then% j) d5 @4 A% Q2 I$ X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( T2 P. E) ~2 F% a, t7 |
to_str("in der Andockstation: \"",?.~.name,"\""));' y& \# V# U2 f' p) r
else
- H1 o1 E3 {8 e$ I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ @+ I d/ L. D- x to_str("in docking station: \"",?.~.name,"\"")); 8 D* ~: \$ } c
end;0 u, P: |. G5 L1 R; z
else
& b+ b: @# @( K/ `2 ~; }* N @.Destination := assignLObj[1,row];
$ j$ L+ f& w/ V, q/ @6 J end; & a' P+ x E' ]7 W3 \! d" l* g% y
newDirection(@);
* _ F# P% J1 M2 P# Z- t$ l @.HasOrder := true;
/ g- ] E5 U7 C end;
9 E* w! a* z( x. y end;$ }5 I7 b9 y/ h5 e* h, {7 m& A; q" m/ X
end; -- of the method# X( h- I- D! k: a1 K& A
|