/* called by: entrance ctrl of the object 'track'. I1 f8 A2 S+ b6 R0 K
*/
7 N8 z: {) U7 Uis7 G L. a" }7 Q2 Y6 p$ ?/ s. m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 y3 l9 o; @" o
do" Y7 j8 q% |+ c* W0 d1 |5 l) E) U
Lan := rootfolder.Internal.Tools.AOLlanguage;4 k. _0 L& K1 I) m: M
if current = @.Destination -- else return
7 Y3 r) X% ~6 @9 T# t then
2 e0 C+ s& @2 f+ [0 ]2 Q0 o @.Destination := void;
5 _( E( F% w$ c0 E if @.occupied then
1 n- Q" Y8 A+ O$ X0 V part := @.cont;
* B8 c1 o) l; ? @.transpOrder := void;( f l z0 ?' t1 v: G: P! e& a: i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' o9 o2 K2 `- R" M# f
@,root.eventcontroller.simTime);
8 [5 Z1 Q' b; A4 B9 l7 g# w! ] @.HasOrder := false; l1 b3 m4 k0 Z' i( y/ f8 [" j
@.DrivingHome := true;
8 ?" t, @2 T- _5 G: y- d rgManager.tryToStartTransOrder;
0 o; O! C& v/ u3 x" w0 N) N if @.Destination = void+ ^% I4 j- t+ h* M/ ~
then -- no transport order for vehicle @
2 v+ ~; j; k$ U: j @.Destination :=6 g/ w% a2 U* q6 F: A( S3 K
rgManager.nearestFreeStation(@,track.~);4 B6 r1 i- |5 M" W! Z' ^
newDirection(@); ) V) ?- x( u9 W! E) H, M
if @.Destination /= void then3 m. S& f6 W" \" B9 u: ?! Q
@.Destination.NumReservation :=
! H4 t8 [) L% ?0 b @.Destination.NumReservation + 1;
& g! s7 _8 @* T7 D( V& `8 K end;; w2 T0 t3 S' h$ T4 I% [
@.CurrIcon := "drivingHome";6 q- E- X5 ]9 ~
@.DrivingHome := true;
3 |/ F* F, H7 N# @/ C Y: b end;2 ]- c7 I1 `: U2 } _- h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& Q9 r$ |) x! a- l; a8 o) z$ e part := @.transpOrder;
* C! d4 ?% }. g part.move(@);-- load part( ?. r7 }% T" h0 Q1 h
@.CurrIcon := "load";
% H" ?, |/ Y" S2 M# e& p; _, S GlobalDistObj := part.globDestination;
& c( L! v! w3 v7 _, w assignLObj := rgmanager.rgAssignL;% g. k/ v# s, W4 j$ y& \" {! A( I
row := assignLObj.getRowNo(GlobalDistObj);7 B! j! J' [% C! R* m
if Row = -1 then -- since 70! g3 W+ D# G) R& A. e1 f' w" v: l
if lan=1 then
# P8 _1 N( @4 d% J0 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 j% j5 C- r1 A/ k to_str("in der Andockstation: \"",?.~.name,"\""));# \" o8 p/ u4 r2 J1 {$ m
else
% [* {' B* ^1 x2 u+ y, P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 X" O# I* n& [: k
to_str("in docking station: \"",?.~.name,"\"")); $ w) T+ k' L W2 T
end;
1 u9 a I7 k4 l else
1 Y/ U. o' f: z7 H6 c' X/ c y @.Destination := assignLObj[1,row];
: m7 k1 K. F ? end; . m, c, |2 N; H) {: }, b6 D1 h
newDirection(@);. Y& o6 D9 S' U! _ q# }, |: }
@.HasOrder := true;
3 A/ M+ {* N' i end;2 B' a8 T7 v" e9 i3 x! W4 d- f7 }
end;" v. |8 A- ^; u* o
end; -- of the method4 I y* I% b5 c% S3 R. _
|