/* called by: entrance ctrl of the object 'track'' s" b* e& O9 Z- k V$ m0 n6 U
*/+ m7 k- M% n& T1 P$ s: i/ p
is
( v+ T* Q. }" H5 c' c! ?1 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 J2 x$ a" ~ U* o
do
0 i# I: q% M' c: ]% | Lan := rootfolder.Internal.Tools.AOLlanguage;
8 @- Z1 p$ W, k if current = @.Destination -- else return
5 L+ u _: g0 B0 ^, E then, _' [& i0 P0 P+ J& m- J) \) a2 j
@.Destination := void;" ~' x) |4 ]9 ^( ~/ q: w
if @.occupied then: G! P7 F/ ^ r
part := @.cont;9 ?2 ]1 L, Q% r; _# n5 a8 R
@.transpOrder := void;; ?/ k/ G) p9 C& Q9 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: j3 T& m4 }0 G9 o7 c* q1 p
@,root.eventcontroller.simTime);, b4 a2 ?$ V0 R( h
@.HasOrder := false;
7 \7 @5 Q% H! d) j+ O, z& P @.DrivingHome := true;
6 C& z/ Y( f: b rgManager.tryToStartTransOrder;
- h: P. Z$ W+ G/ E if @.Destination = void
0 i$ q1 ~+ S! n A/ [* L+ x2 I then -- no transport order for vehicle @2 E0 b( ~8 V6 V7 y" W3 |% I
@.Destination :=
! n6 g+ q) `, M3 E5 U; P rgManager.nearestFreeStation(@,track.~);9 T& s9 ?# a8 ^/ L+ R7 m
newDirection(@); ( p+ h2 U5 u+ X" {
if @.Destination /= void then7 R9 n' e# Z ^* _, H5 H
@.Destination.NumReservation :=0 [% c9 [) I# P) {' z" K* e
@.Destination.NumReservation + 1;# d5 L; x( L* z8 ]! o1 D& `
end;) @5 V) a* C& U- t5 u
@.CurrIcon := "drivingHome";# U& W- @& c5 X% G
@.DrivingHome := true;5 M) A$ B( N5 e+ a: a' r
end;
- Z$ H" d4 i& e2 C& e2 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 D6 t" j: F. x) T0 l. t3 u! F7 H
part := @.transpOrder;
5 R/ y; Q; H" D4 d9 u/ z part.move(@);-- load part
1 |, S- d) b9 q; ? @.CurrIcon := "load";
9 c: d& z7 ]- z4 }+ }$ Z GlobalDistObj := part.globDestination;
- C3 s/ P( z7 ] assignLObj := rgmanager.rgAssignL;) j9 L; I z3 q
row := assignLObj.getRowNo(GlobalDistObj);
. e5 [! o3 m+ v8 o. X0 D, N if Row = -1 then -- since 70; v" G$ y) j. J4 v
if lan=1 then! C% a; b4 T9 D- n! A5 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, u( v% R, N6 n to_str("in der Andockstation: \"",?.~.name,"\""));8 Q# W( U f. ~" T8 E/ C+ v) l2 ~
else' V6 Q) H' b( _! ^4 N( n3 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 o+ S/ |9 F( q3 J7 X$ X
to_str("in docking station: \"",?.~.name,"\""));
! Q1 S# Q+ n% [, Y; D6 q( y end;
/ l: P$ B1 J) ]5 g: W else
: [; m' J* G c& _: l2 R( |( t @.Destination := assignLObj[1,row];9 s+ M' p" Q* u3 I
end; 9 D. N, Z. j6 S. Z) k/ l
newDirection(@);
! r5 N" y* T6 U @.HasOrder := true;
0 q. A. F' K8 x& p+ Y$ x end;* C. [& p3 s6 q, U# v- L( _! U6 J
end;
N9 S% P3 e) y: v& yend; -- of the method
' A# |8 U8 g+ P |