/* called by: entrance ctrl of the object 'track'
1 Y/ P, l2 ?! m/ f*/
1 @- X" N7 m8 p$ Q! N, \; his
2 o; j, F) x8 Y! b" p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% E% Y/ X/ b9 A: kdo8 y1 a! R9 I8 L- m, V! S
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 w, { e) g' e. | if current = @.Destination -- else return
7 H' h6 Y4 l0 ~2 Q/ i2 r6 w/ W' c then
9 W, ?! V" u" h' h! w! L$ H @.Destination := void;
: ]1 ^; N- ? u7 T$ @. E if @.occupied then% W! j1 E4 p8 F! e/ {. p1 r
part := @.cont;5 R5 p7 @' n; K T6 s
@.transpOrder := void;! `* ?4 I2 u# V* v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! y! ~" S) C* A* @ @,root.eventcontroller.simTime);# Y. X; j: _& q3 v7 P
@.HasOrder := false;
, y# m& W w! |+ _ @.DrivingHome := true;( o( L3 S' @5 x- |, ?8 t9 v
rgManager.tryToStartTransOrder;# Z2 N& a( x& l6 k! P
if @.Destination = void
5 Y' O9 ? O# u2 g6 ~ then -- no transport order for vehicle @
% ~) K; |8 n* L: T/ ? @.Destination :=
( }$ S& [8 L9 i4 z, K rgManager.nearestFreeStation(@,track.~);' _" x/ ~# g: Y2 S1 s7 V
newDirection(@); 4 a7 F' M$ L; \/ N( s) F
if @.Destination /= void then3 _* M: a% }" V2 u, ~
@.Destination.NumReservation :=
% Y, s1 \- o4 T) h+ |/ P @.Destination.NumReservation + 1;& i/ N- i* I) v& l. {
end;5 D/ e# e: D; T% J/ v( t# ]
@.CurrIcon := "drivingHome";
5 y! l- o: N9 h6 H- p' H0 ~3 j* B @.DrivingHome := true;; J$ Y# q* k8 s% L0 R
end;
5 X/ u3 d7 v$ z8 K, [- m else -- the vehicle @ is empty, both vehicle and part are in the same dock station" |% W M2 _( n8 c
part := @.transpOrder;
+ E3 Q7 m- H L: f part.move(@);-- load part ?7 \2 F9 u! W3 a
@.CurrIcon := "load";2 {. m7 l3 L9 n1 @6 ~; g
GlobalDistObj := part.globDestination;
, ?) h M7 ]+ _, c5 j9 [& S2 @ assignLObj := rgmanager.rgAssignL;
5 i n1 z: o. x z/ g row := assignLObj.getRowNo(GlobalDistObj);* j; C4 u2 ?! Y0 m0 p! N% J# D
if Row = -1 then -- since 70; G( `3 w( |! |
if lan=1 then/ p1 F4 i! W! R9 v; e/ { I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ a q6 r; V0 e, `9 o9 V5 f
to_str("in der Andockstation: \"",?.~.name,"\""));2 E$ ^8 Y* _# ^- c" a5 q
else [2 _0 B0 I7 w. O7 Q. @0 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: X/ s* G. @2 i to_str("in docking station: \"",?.~.name,"\"")); 0 ~4 \! }7 U& N
end;0 C' U% o6 h2 ?5 O
else
' z( z; j! i9 _( f, E @.Destination := assignLObj[1,row];
( F+ @8 }5 j3 H1 q6 b* C end; , |4 j" b- ~+ q" h+ P$ h2 h
newDirection(@);
& B4 [; B8 ~, ^ @.HasOrder := true;, D) M( i8 g" o' s! o5 `
end;
' ^. N6 V* f% P: w* p& o end;. |0 y/ v" o' w& Q6 P
end; -- of the method7 b* Z, g$ R6 _* Q: n, v
|