/* called by: entrance ctrl of the object 'track'
0 L- a4 N _, I" [*/
m0 ^& W. H1 d" D2 c$ U2 ]0 tis4 v' v* l: N9 b8 |) ^0 G. _* e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 a x' n! ?9 L1 x+ ado% h6 l: e' T, G) @
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ p6 H" [: P8 o8 O! ` if current = @.Destination -- else return
% l0 y- m9 @- @$ I$ b+ O then0 {! B% Q# n" J; Y% ]! { ]9 x2 w0 S
@.Destination := void;
- }# Z5 }2 R9 H- K! k if @.occupied then' l. u B$ D" P+ Y' z; q2 m, i
part := @.cont;
. f) ^0 _0 Z# R9 L& H: m) K3 q1 r @.transpOrder := void;
# o: ]' f' ]2 P; r" {0 A1 l! K+ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; e* R& u' L0 J) M( v. T4 p3 d1 H @,root.eventcontroller.simTime);7 i+ n- H, _7 A: D3 ?
@.HasOrder := false;
4 g1 r- M& N$ W0 s A% a. s @.DrivingHome := true;
, e1 C# J, N% Y' S* v+ s rgManager.tryToStartTransOrder;
2 {- b1 w. r: S+ M( a& H% B% X if @.Destination = void
" f+ P" m4 w# v* V4 z7 E then -- no transport order for vehicle @
" C. k X# o( y- b" O9 T- w @.Destination :=5 a" y% z, H1 R, D# H
rgManager.nearestFreeStation(@,track.~);* h, e- V# s3 b3 i+ a
newDirection(@); * b7 q& Q/ G3 G7 Y0 ~' L
if @.Destination /= void then. c+ a5 N' A; }8 r
@.Destination.NumReservation :=
% y1 I+ G0 ]' _2 \ @.Destination.NumReservation + 1;
( M2 p, `& }/ l b( k) J" c end;1 p% E% d$ _# d
@.CurrIcon := "drivingHome";
! d+ ]1 v- D0 F* s9 ^" @ @.DrivingHome := true;
/ V5 I% u; X7 c* C/ _$ S end;
# I; q$ ?. T+ Q+ [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ~( o$ t3 h6 ], f
part := @.transpOrder;* O% \+ ~2 p6 W: H; {" f8 ~
part.move(@);-- load part
# h! r2 ]# n4 g% }* h( B @.CurrIcon := "load";: V5 m, ]5 _; Y% p' ~7 q' V
GlobalDistObj := part.globDestination;7 j# F2 a% q) y. V1 |
assignLObj := rgmanager.rgAssignL;1 `/ g q$ k& ?1 X; Y1 A( d8 G
row := assignLObj.getRowNo(GlobalDistObj);4 ?8 Y9 }' x+ | p/ E+ J7 C: W
if Row = -1 then -- since 70( r; A, H, g2 b, m$ v5 m, V k
if lan=1 then( E+ M2 O* Z+ p$ Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D: O% o3 d7 t" A$ I: J0 f8 J' N, W! [
to_str("in der Andockstation: \"",?.~.name,"\""));
- L8 x% q; x* B3 N; K else8 q7 v' x1 R$ q( k8 M* v' l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 E( l5 J4 Q# H' S. f) F F to_str("in docking station: \"",?.~.name,"\""));
2 j- O& |# } b, a& b# `, _4 P end;
" j0 g8 o& a' _# r; Y else: o; I- F v* P! `& B7 F' A- R
@.Destination := assignLObj[1,row];0 M% ?; {3 }8 ^) d' n6 F, X
end;
7 o% m4 w" f; u; n# k3 s newDirection(@);
* a4 K0 v2 g- \/ @ @.HasOrder := true;
- }6 S p- z. v end;/ }8 H" f) J. {; y. b" ?/ {
end;
2 [0 q% D! Y+ U* }% A$ @# fend; -- of the method
8 O/ _6 t) | b |