/* called by: entrance ctrl of the object 'track'
: j$ O) e, I* {8 H" z! E8 r*/
9 x6 l2 D: c5 r9 ~1 Q% @is9 L7 G2 v) e; S2 }, O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) @+ V3 v6 C2 Y
do
; |8 n% ?7 ?# K4 g# _ V1 C, d: p. k8 k Lan := rootfolder.Internal.Tools.AOLlanguage;3 }. t8 I# d; x0 \* V }% t. e
if current = @.Destination -- else return
3 M# C F# l) A then, T" `- U- j7 h2 E6 S+ m/ B
@.Destination := void;. ~$ c+ X( w8 g0 i% c8 n
if @.occupied then/ x" N; ?8 a9 L% N
part := @.cont;7 H; M. T2 {$ ~3 O# P6 s
@.transpOrder := void;
$ B4 U" c% j: a7 B5 M+ z: d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 }* c: e( v4 I# P) \
@,root.eventcontroller.simTime);
$ g7 x3 Y0 s7 b/ r @.HasOrder := false;
7 O1 P' o( C' _ j5 U3 u! n @.DrivingHome := true;: { D4 i3 G: q
rgManager.tryToStartTransOrder;0 K5 B4 S9 a2 t" G8 @) V
if @.Destination = void9 E# V1 Y) O% c
then -- no transport order for vehicle @
7 I$ e, `) o- C- l6 z @.Destination :=2 L0 F, H4 [3 e" j4 T( S8 x
rgManager.nearestFreeStation(@,track.~);: o3 [6 N, L M6 Q
newDirection(@);
+ m. R! ?/ [1 E( y7 M1 l3 b if @.Destination /= void then; V4 C# o% [. Q) T; x5 H5 V
@.Destination.NumReservation :=$ M5 e# P" W- a. B2 n1 S
@.Destination.NumReservation + 1;
! D" a1 U) f. p. j end;
- _9 G" k+ l, p O$ y @.CurrIcon := "drivingHome";8 G. c7 U) |' d$ o- t
@.DrivingHome := true;
" p4 V' C- i/ p end;( j" I1 o' o! }) b7 u: Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 [4 v* T# E8 W) J6 {6 d part := @.transpOrder;
, Z9 M! A! e$ G9 k" g, a part.move(@);-- load part3 h" Z3 b: G- p2 h6 Y' Z
@.CurrIcon := "load";
3 o0 I# Z2 B/ r+ J" @ GlobalDistObj := part.globDestination;( V& n4 F- q' |" m( d6 p4 H
assignLObj := rgmanager.rgAssignL;9 T- M2 y/ U- g5 b" r
row := assignLObj.getRowNo(GlobalDistObj);
0 e U; y1 @ [& k C2 z if Row = -1 then -- since 70$ o0 f1 N" g- l
if lan=1 then' R0 w8 W& [, |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 u. r2 R: i% R; ]. d- X4 Z- t" A to_str("in der Andockstation: \"",?.~.name,"\""));
& q' Y4 P' @' u9 b else
# m* q% N: S- D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ U* _+ D) a7 M$ r4 `8 }* v
to_str("in docking station: \"",?.~.name,"\""));
3 c5 y& V o5 O8 E& F end;
; I8 W" X+ R' s% ~; a2 W% ? else
' Q( `' h6 p3 x. o6 v- g @.Destination := assignLObj[1,row];
- r3 i+ o* L6 U+ e9 R end; : l& b0 A% _* U2 l2 U8 l% r
newDirection(@);
6 Q W* J' m: t O3 \( K* ]) A @.HasOrder := true;
% J3 W% N/ i7 Y+ x) N4 p/ m end;4 k1 h; y. M& r% }
end;% Y4 ?3 j' v/ I4 O* K
end; -- of the method! {% Z4 C1 d/ _/ K- h* x
|