/* called by: entrance ctrl of the object 'track'
% q7 y& M7 f: K* h& J: A*/' C! N. U! t' ?6 T
is% }& w; x- I. G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. f$ n$ _8 k) U8 L7 U9 a- h
do3 F; A4 Z! j; r
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ _- l: h' [. I) J if current = @.Destination -- else return$ _! H" a8 |; p9 j6 T; u
then
, W; q$ B8 P/ s1 Q @.Destination := void;
0 U9 x. K+ _/ ~4 o5 S3 Z if @.occupied then
8 G8 T* _6 e! F( d" N- j part := @.cont;: [/ q: a) U& T5 N
@.transpOrder := void;
/ L% M9 y! f1 H! V1 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: L* Q% X1 A! P6 _- i" s$ y# Q1 z
@,root.eventcontroller.simTime);2 E/ Q& O3 b, S; |2 m2 H5 f! y
@.HasOrder := false;2 K- p N$ z) T6 I, O
@.DrivingHome := true;3 R" A `& B3 t' H0 J4 k9 L5 s
rgManager.tryToStartTransOrder;
, U5 O& [ {: S1 I/ p3 T3 t0 U if @.Destination = void( ]4 k8 A! w; R3 {
then -- no transport order for vehicle @
+ z+ f P0 N* E1 ^4 N! L4 B+ m @.Destination :=
& S# Q8 A& o! M! B0 N* t rgManager.nearestFreeStation(@,track.~);
7 k: F3 O$ f( y/ [ newDirection(@);
/ i# P0 {5 V Y; x3 c1 R3 F if @.Destination /= void then
" |7 l5 @: E- l7 Z- l6 I9 J0 K; ? @.Destination.NumReservation :=
- X2 w$ [' }2 ]8 V @.Destination.NumReservation + 1;
% B4 s/ j. E/ l3 } end;
: }( p% R/ C3 s" C( [, f+ \ @.CurrIcon := "drivingHome";
6 y6 E6 D& c$ e& S; S& I @.DrivingHome := true;. ^8 {0 W, a+ H8 U
end;( Z9 \* v; {: Z9 x, B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 I* ~4 S: q5 |9 `4 i9 B part := @.transpOrder;
3 {! y" j: X4 N4 w9 p6 k part.move(@);-- load part
2 u" _, s) u- v$ ~$ T @.CurrIcon := "load";
# |1 S1 V. b1 k! N) r GlobalDistObj := part.globDestination;
; B9 `; m- V5 n, g assignLObj := rgmanager.rgAssignL;
, L, ~7 J+ [9 g. F row := assignLObj.getRowNo(GlobalDistObj);
/ `! m, L5 g( m ]% _- y$ j if Row = -1 then -- since 70, Z2 E# O4 k. s" r. Y2 E/ q' Q0 j
if lan=1 then% R% W6 I U4 }" D% b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E2 _. Y- t0 T6 l) w, t3 V
to_str("in der Andockstation: \"",?.~.name,"\""));$ j J/ J; }) j8 U9 R
else" C3 I; |! G& C* u3 P) e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- X+ T# Q* M5 D, l5 d$ e to_str("in docking station: \"",?.~.name,"\""));
2 l3 x' Q( z$ S S# K end;
! |6 p2 ~5 t6 q! n else$ D" Y/ j6 v8 u! Q
@.Destination := assignLObj[1,row];8 _- S# ~, _) L6 V k$ K
end;
4 o# V2 ]8 B2 n- U7 _& q newDirection(@);+ F: k7 E/ ^* @
@.HasOrder := true;1 X+ U: Z! L% f" C
end;' S% ~( ]+ y+ `, z
end;
# ]9 Q# ]1 g$ [5 |8 @9 Nend; -- of the method7 F0 w: |8 O. i/ u
|