/* called by: entrance ctrl of the object 'track'
, ^# d/ P8 e( e*/, ]4 N# w/ [- {* X# c) z6 u
is# m& }$ j) r4 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 k6 O% A% ], u7 q/ y0 B
do
! E5 m- l. x5 {" q! n# [ Lan := rootfolder.Internal.Tools.AOLlanguage;
5 S/ m+ Z3 k1 J if current = @.Destination -- else return' V3 g: _' N" i, y8 g! Q
then/ i, j: q# C/ W; v2 P
@.Destination := void;
6 V. ]: c- \7 Z" b% m8 ~" B) ? if @.occupied then! I& K0 Z3 [8 A* k0 T
part := @.cont;: j' @1 }" p4 A8 `
@.transpOrder := void;
; u; x- _% o4 b4 k( j' P" K5 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! g" i& T; E) l7 d, U @,root.eventcontroller.simTime);6 F7 f) N. y8 `& P( g2 J
@.HasOrder := false;
8 i0 ]4 {: }" C1 J7 d& f" b/ } @.DrivingHome := true;
! A) ^! C) P4 ~/ F' S rgManager.tryToStartTransOrder;
% W' d8 O3 S1 l8 ^1 D3 Y+ B if @.Destination = void" r: f4 B2 K3 K
then -- no transport order for vehicle @
' R: j' b0 I+ x/ s- r8 _4 b @.Destination :=, P4 J5 [: Z6 J/ v# M5 e
rgManager.nearestFreeStation(@,track.~);0 r: Z$ `. P1 l' g
newDirection(@);
$ Y! {6 q o6 X* c( b if @.Destination /= void then l$ s' s; n5 U/ ]) ?( W6 w) L
@.Destination.NumReservation :=
- \5 i k) U; K @.Destination.NumReservation + 1;* H6 d$ A1 a* r9 b9 f
end;
* j- ]' V* B6 E2 d @.CurrIcon := "drivingHome";
Z# O4 n, D# K9 c @.DrivingHome := true;
% s f5 P0 W" ?) `+ T0 s end;$ M% h& q8 u: x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 p8 C1 `) j: f" R7 k part := @.transpOrder;
0 x0 z1 C7 R" E& c$ P& ]$ `" C part.move(@);-- load part$ n9 X" b4 s9 j9 ?3 a/ E: B! r* i
@.CurrIcon := "load";8 s0 }# c9 u" X8 b( }3 x: x: u
GlobalDistObj := part.globDestination;9 R. l* _" G, L' z2 X* u- n j
assignLObj := rgmanager.rgAssignL;
1 A! ~8 _% W9 W& k$ X1 d6 e0 ^ row := assignLObj.getRowNo(GlobalDistObj);+ \* ?# p! ?1 k- ^6 p
if Row = -1 then -- since 70
1 S8 z: }* Z) Q% e if lan=1 then
9 ?, g! t: j' M/ s+ A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" r B$ U$ F4 j7 v' I% ]- { to_str("in der Andockstation: \"",?.~.name,"\""));. L# K7 q& k6 L0 W' X# D
else$ x: X5 V8 \/ s) L: Q; u6 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) s, F1 P+ I' T. `7 }+ b# g3 i" n5 n
to_str("in docking station: \"",?.~.name,"\""));
0 a, \5 g: ^5 \# a/ M end;- G1 ?# |# m/ N( Z- p2 }3 t
else
: t) r8 \( r8 }4 V! A; n8 U [% y @.Destination := assignLObj[1,row];% E# J K4 d2 ~
end; % h5 v( T' ^4 H, Z L/ [
newDirection(@);
1 F" ^) F0 s) c% F% e; J+ M; P% d% w @.HasOrder := true;. O3 H& V I' t0 ]
end;
& v7 a1 |& |8 A h3 C) Y end;, I6 |3 M* U8 Z0 \
end; -- of the method
7 d6 J0 }; }! |* w |