/* called by: entrance ctrl of the object 'track'
! D! O1 Q( t' y) v6 @( H2 Q*/& V4 z, W8 g& W8 t
is+ c7 d, r, e5 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ C& s- F& E7 Z0 L. V+ u% u/ }
do1 X* s; r6 r- }3 S0 d1 c5 K9 M/ A. o1 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
( o1 j5 l1 e$ I/ l* t' r if current = @.Destination -- else return
4 a2 l* b$ B$ b1 G& \ then
7 H% h3 D M! D: X. K+ l0 { @.Destination := void;* @; Y; I% `' T5 q7 z1 K
if @.occupied then
2 B* i8 b0 }" N7 ^# f2 i part := @.cont;5 A/ [) b" S$ P @* T6 g Q
@.transpOrder := void;3 s- x, K. D& e3 \9 V. B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( j) o2 x2 A$ m$ j B6 m
@,root.eventcontroller.simTime);1 V1 T) Q7 X$ _4 T- s
@.HasOrder := false;1 A! g" v& N! M% t8 T0 @
@.DrivingHome := true;0 V( g( m; Y# S4 x' a+ P
rgManager.tryToStartTransOrder;1 e( N X; \: b( ]6 l+ t! }
if @.Destination = void
# C! E; h# A2 _& J4 U! D then -- no transport order for vehicle @
$ r# j4 D0 f1 W8 ]7 w" i! ? @.Destination :=
3 n T, y/ w9 f8 G' z rgManager.nearestFreeStation(@,track.~);2 O! N# A1 G7 I. T( B1 A* n+ U% |
newDirection(@);
! N( x! `4 g# w8 ~0 u8 D if @.Destination /= void then/ U% p R9 M9 [$ P5 ?+ N% S
@.Destination.NumReservation :=
4 p: ?' m7 }; h: B% U* t# B @.Destination.NumReservation + 1;
. d1 v: ?5 P( v4 ^ end;
1 o0 R9 n; \7 `9 i; ~ @.CurrIcon := "drivingHome";# q* F: ]2 @; A- d& c
@.DrivingHome := true; F2 J+ k7 p5 D! o4 P3 F
end;; N: |7 R% E& L& T+ e% v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 X$ B# {# q7 N, `8 K0 d8 o part := @.transpOrder;6 s5 f4 f( s" _
part.move(@);-- load part
" x% ]& @$ J. j0 F+ a9 ?2 i @.CurrIcon := "load";
) w. J7 v/ Y6 t' k+ }, K5 {$ I/ N: N GlobalDistObj := part.globDestination;
" e$ u# [1 v% ` x! c assignLObj := rgmanager.rgAssignL;
$ o0 h, @8 b2 S$ K" p row := assignLObj.getRowNo(GlobalDistObj);% [& J6 z( B) E+ O' y0 n
if Row = -1 then -- since 701 L" J; d3 d/ [9 |1 g% u
if lan=1 then! L$ x! J6 E% f6 B, h% k( S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) W6 T7 i/ c# G; e0 x% f8 G to_str("in der Andockstation: \"",?.~.name,"\""));
% t B+ V) w" ]9 p/ \' }. y else* @5 N3 _# g, g: W# h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ u7 w; @1 k4 X# ^( G to_str("in docking station: \"",?.~.name,"\""));
7 j3 `. O- j7 B5 z9 e9 j end;3 o/ d6 R1 w, `4 d# }' L* w
else4 y# @; }" m) p! K5 j$ b D
@.Destination := assignLObj[1,row];/ }! l7 w: U4 L& d' d0 S8 \% E
end; " y5 j6 x" l+ s! [; I
newDirection(@);
2 y" j+ Y. k7 J @.HasOrder := true;
- r$ b: G* d1 P8 i' B end;, ?1 d2 n; i9 A; v
end;
3 K8 S# B2 p8 l5 \8 Vend; -- of the method. @5 U' @; ?0 e/ u3 f2 u; t
|