/* called by: entrance ctrl of the object 'track') f0 U" k: m% T% g3 s# z3 e
*/6 m% _8 o, G: X* } L
is9 Q+ V, J& k5 s3 M) ^- J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, v# s' q1 T9 N+ C+ A4 o. jdo
6 Q9 K U c9 x# }: |7 P3 | Lan := rootfolder.Internal.Tools.AOLlanguage;
q, t. q8 a# b% Y+ W p9 z if current = @.Destination -- else return* X6 K3 C$ k/ G0 I
then
. S- T/ g; \! q2 a, u9 V9 B @.Destination := void;
( E" E; z1 t4 B5 J2 X! g if @.occupied then
2 l- Y$ L1 \) \8 Y( H+ P. H- k part := @.cont;! X7 w4 F- s: Y- z
@.transpOrder := void;% B( s. I3 W1 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! I6 O$ |7 S! s* J
@,root.eventcontroller.simTime);
( f7 O, u8 x6 D2 O# V$ u: L @.HasOrder := false;
: o& J4 o1 C$ R+ ^$ D) x* a @.DrivingHome := true;
" d9 w( I, l7 ]- k! L: M1 @ rgManager.tryToStartTransOrder;
3 Z% N; u, z+ {" i& ^6 a if @.Destination = void8 M& a% C: t1 _
then -- no transport order for vehicle @
" m3 u* s& `+ E. h k( [: s. x @.Destination :=- `( q( T7 g3 g8 G. t+ K$ i1 q. j
rgManager.nearestFreeStation(@,track.~);
/ c8 M+ Z( P; l+ [: e- } newDirection(@);
: x( A) W( j6 }8 d if @.Destination /= void then
: n# u( J$ G9 g1 O @.Destination.NumReservation :=) I6 A* d+ r8 o/ E. t1 B
@.Destination.NumReservation + 1;; M: @5 M8 \* j. Z2 p
end;9 h0 x7 }+ M* @$ e! A" S9 i
@.CurrIcon := "drivingHome";
7 z1 C* c) u2 ~) w* L5 d @.DrivingHome := true;& o- G+ ~) E" K- |5 E0 |# G
end;0 M) C& f: J2 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Q; V% }* v- {9 j part := @.transpOrder;
# @" N% C$ c. u8 }1 {1 F part.move(@);-- load part3 W1 i( b6 m4 D! K7 a% P: W2 U
@.CurrIcon := "load";& X: L' E3 e. h
GlobalDistObj := part.globDestination;0 q% p% c* k$ A0 n R5 \3 k
assignLObj := rgmanager.rgAssignL; T6 ]' c( r, z% S2 R8 ~
row := assignLObj.getRowNo(GlobalDistObj);7 O, L. D0 ~/ U" S! t! Y. l
if Row = -1 then -- since 70! D2 X8 F- A/ c# c6 N
if lan=1 then
; i4 x* M9 G7 A- W- p: ~- n& u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# I8 L4 G# ~1 w1 O
to_str("in der Andockstation: \"",?.~.name,"\""));2 C' d3 L& ] W
else. ^' f# g4 K9 n9 Z3 M9 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# H6 l8 D$ d; Y. P- ^ to_str("in docking station: \"",?.~.name,"\""));
p( V1 A3 a3 W8 N end;
4 }6 p8 @# I% k) G5 r4 C else" o) [, g# ^; F
@.Destination := assignLObj[1,row];4 t4 _% F, Y8 D- I' I# ]
end;
& h l4 `7 Y$ Q+ d, _" E( r$ ]! k newDirection(@);# _( A: ~( @5 Y% l; @
@.HasOrder := true;
3 u" J! T) F, k* ` end;
8 T1 I0 V+ R: m9 g, ~; H$ R! z end;9 P: V" n" l( L; m( N, ?
end; -- of the method- K) ?) _6 V# U. d+ h' [- W- u2 k" ?! \
|