/* called by: entrance ctrl of the object 'track'" ^+ Y9 |0 y. H4 P: H
*/
' d2 A- O0 f! Z# b, @# u5 wis
$ I3 b+ n/ i+ k/ v& t part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 r& Z2 v6 g8 V( D
do6 C& D$ u; o8 ~, v
Lan := rootfolder.Internal.Tools.AOLlanguage;3 v/ S+ g. j# b: Q) j
if current = @.Destination -- else return" _9 |5 U8 S6 D; s2 c
then6 W0 E$ K9 L( s/ s! M
@.Destination := void;! Q" @$ q7 o1 P9 \% c
if @.occupied then$ t: ?: ?# J6 F6 ?# C
part := @.cont;, x; q2 _! j- z, f1 l7 _ z
@.transpOrder := void;" f& @: R9 e5 n2 E4 N: z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ^ D2 u3 k* e# ]6 K8 [ @,root.eventcontroller.simTime);
- ]$ c2 e! J6 e% F9 l, X @.HasOrder := false;
9 D3 X0 W! H6 ~% b @.DrivingHome := true;
: X) y+ l6 f% [8 [$ K3 S rgManager.tryToStartTransOrder;2 A& s- |, O. `% F
if @.Destination = void4 q6 n5 V4 S' h# z, k+ L2 @
then -- no transport order for vehicle @
: q/ Z/ B' F% v5 z6 |) m6 L @.Destination :=
1 l' j5 K0 _, V# @' M5 E8 E rgManager.nearestFreeStation(@,track.~);
9 u5 g: Z! o3 s% ?- ] newDirection(@); 1 a! i" P" X* A E" c
if @.Destination /= void then5 E& ^- ^( n9 z4 l; o. |4 @
@.Destination.NumReservation :=
6 {2 ]2 |) J6 a4 U' a @.Destination.NumReservation + 1;9 n) I* H- y: s' k* S3 s) w
end;! C+ l; b' p& y: e6 B
@.CurrIcon := "drivingHome";$ i3 R/ u$ J# L$ p( o5 c
@.DrivingHome := true;
* P: l9 x8 m7 _' \ end;
, X+ U, A; r! j0 P1 N; r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( [4 C4 P- Q4 Z. }# `1 R part := @.transpOrder;8 M Y) |# e/ Q) C w
part.move(@);-- load part
+ x% f) \$ T6 l4 P. \" T1 [+ ?4 K @.CurrIcon := "load";5 H0 \& M3 S. e" c; d0 A4 s: h% I% ?
GlobalDistObj := part.globDestination;1 f2 v* S1 o7 c6 K5 E0 @. d/ _, x* S
assignLObj := rgmanager.rgAssignL;
) O6 f! a6 ]" D0 D- i1 K3 | row := assignLObj.getRowNo(GlobalDistObj);. N; D) A: m$ l+ `
if Row = -1 then -- since 70
% P+ b' p! q0 ]2 z/ x% G if lan=1 then
" ]3 @* R$ N8 k9 D6 o7 O; ^+ G2 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ v, v( y3 ?- E3 T- a to_str("in der Andockstation: \"",?.~.name,"\""));
, ^2 y: m6 _' a else" e* p9 C H) i" ~9 l0 o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ W9 v9 f5 h, z) b9 s
to_str("in docking station: \"",?.~.name,"\"")); . z* J2 \* R; i; v' {7 G
end; r* y4 g# b5 q4 r [$ O
else
" I9 H$ ~# A F @.Destination := assignLObj[1,row];" R4 H! p7 Y6 U' t1 g+ l5 V
end; : B: F8 ^# U4 U
newDirection(@);
3 U* x+ X* |/ |3 f- V' Y @.HasOrder := true;
" \( c$ v; s% s8 U4 f end;
9 i1 C- i7 P( l) |" C; E P end;5 L) r' X2 s) ?; ?+ Q: a. F8 B
end; -- of the method- e" C( L5 c' ^4 H+ ~
|