/* called by: entrance ctrl of the object 'track'! C6 Y' G6 u5 o3 G) g. H: t! B+ H
*/: ~& @. h4 y% x$ f9 o) c
is
5 v: b5 K0 p0 n0 i l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, x h" S. x' `. K' i3 z5 Y# vdo
- p& |% n! d; F& G2 z5 ~6 j( D Lan := rootfolder.Internal.Tools.AOLlanguage;
U/ t9 o' r9 [& M/ [6 L if current = @.Destination -- else return5 p0 ^" o m8 A& k/ `% y4 ^! ~
then
- x. V. T( r; Y: k" E+ P8 A @.Destination := void;
4 O3 B8 o+ Q- o+ R8 Y if @.occupied then! V( H# g1 P5 |- |" u. K# U8 G
part := @.cont;
; H1 Y7 L% d9 {& w @.transpOrder := void;
/ |2 D; n) i1 _& \: U3 v6 h. v) T* F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ~9 S, p6 O4 Y
@,root.eventcontroller.simTime);
% Z; Z- e1 E, M0 C @.HasOrder := false; G [$ b' X' {& S }9 p( R
@.DrivingHome := true;, G7 Z" R7 m [+ [: H
rgManager.tryToStartTransOrder;
% J3 S9 X5 |+ U7 L. U9 l2 @8 P# L3 @ if @.Destination = void
/ Q( g G+ g5 \1 d6 T2 x then -- no transport order for vehicle @& O* ? J e8 {8 \, {. \- v6 f5 ~
@.Destination :=2 t* R9 L3 j; v- H
rgManager.nearestFreeStation(@,track.~);
+ U1 q0 |* s' Q; A' r newDirection(@); + @9 D- J# R( B. o* M
if @.Destination /= void then
4 ^3 u" u$ R' s' { @.Destination.NumReservation :=/ N1 ]+ m2 r. ]# ]* e5 a8 o
@.Destination.NumReservation + 1;
# \2 W2 g& G. y! _8 |% B# L% C end;
- b/ I* l& ~. j" ]3 H: i. \ @.CurrIcon := "drivingHome";
+ k w% k- Q0 C2 ^" y @.DrivingHome := true;
9 q o% t% r K m$ O- n8 H end;
) _/ I- ?2 @: D I2 }; w0 j) [4 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 o+ B& u) q1 l: z; [0 g; U part := @.transpOrder;
7 C7 @" D6 j8 I5 [5 a W7 a. b part.move(@);-- load part
( q& B5 R/ y& |3 ` @.CurrIcon := "load";/ ^1 D! ?# z& k! m! `+ ^% C& D
GlobalDistObj := part.globDestination;5 h% |& O& ~) L; z5 a, L1 G
assignLObj := rgmanager.rgAssignL;
+ h1 t' c% L/ L; z9 F row := assignLObj.getRowNo(GlobalDistObj);
6 ]/ r5 O9 h/ L! @0 P6 P" W! g if Row = -1 then -- since 70
9 V! k+ x9 F: ]) w- ^ if lan=1 then3 o8 a; U/ ?, o U9 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ C) r( S' I* }5 r! f to_str("in der Andockstation: \"",?.~.name,"\""));
/ Y, Y/ o2 I4 U9 k3 k* z7 u else
& d8 v5 _3 \" A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }4 d. H: P, n! D1 r4 c- _6 W to_str("in docking station: \"",?.~.name,"\"")); / M, G2 b# U$ {+ X% \' B4 v, r
end;
2 J7 a3 f' v- t4 L# d% k else2 C6 {- b$ q3 B: [2 j6 k6 J
@.Destination := assignLObj[1,row];3 U* {+ w ?5 y; K# n0 ^+ e
end; : A! \& {1 S/ z3 q1 n/ J; _
newDirection(@);
, T1 h f* ~5 V, o" R @.HasOrder := true;" D: r6 i- V+ N7 L0 J
end;
3 Y' f9 |* P. @, h' f/ v end;% K# U3 V2 D/ I9 k5 d* R5 U: w. N
end; -- of the method+ |; [ v" _: B. ~) z3 J
|