/* called by: entrance ctrl of the object 'track'
5 T9 Z3 T, B, d1 h# b V+ K5 V*/
( o4 I& c. I* t; ]is+ X v2 A4 Y1 X# r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 h6 X: B+ |$ q' p- e" H# s: ydo
# F# a( y1 ]. X Lan := rootfolder.Internal.Tools.AOLlanguage;
3 F, e4 b" c" Q* p V/ O% ~ if current = @.Destination -- else return. c7 ?3 C B3 s/ E, z8 `
then1 _, I- c' |- Z/ R( H
@.Destination := void;* e7 ^; a+ [ z# Z; f% n- x7 q
if @.occupied then
2 B0 X! p3 p3 P0 [# I/ C part := @.cont;
; Y) Y; }; M! `3 ?) n5 _# i @.transpOrder := void;
$ [+ D+ @! z6 k( K# R" C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. p1 x/ C* `0 e: o- B @,root.eventcontroller.simTime);: a {3 M& ]8 ?7 _
@.HasOrder := false;
- O6 @0 |0 c: ]6 d4 r4 S @.DrivingHome := true;1 k, C! O& d( X4 T6 r0 _
rgManager.tryToStartTransOrder;
) Z1 q0 e% m- y, d if @.Destination = void! f1 M# m3 @6 H1 T' D
then -- no transport order for vehicle @
8 J1 ?# B4 s8 t' O0 ]6 m8 e @.Destination :=
. f1 u; u& q0 z ~2 U3 y0 s% | rgManager.nearestFreeStation(@,track.~);
" I6 `3 Q& U& R: g8 }$ _ newDirection(@); & g( M* v. h) Z- Z! O8 S
if @.Destination /= void then
( [. P8 c. D+ x" j/ \ @.Destination.NumReservation :=
% _! R( x% ~. \ @.Destination.NumReservation + 1;7 S1 o, u1 m: e8 s6 z0 c n
end;3 f) ]( l9 b' a
@.CurrIcon := "drivingHome";/ w% R4 e& G* D' R
@.DrivingHome := true;
9 q4 N6 T/ B% J m7 y) U0 q$ w end;$ F' S- d. C- z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 I( j4 ~$ k- W# C# @
part := @.transpOrder;% o$ _ X2 S M
part.move(@);-- load part
: T7 B# I# `" c1 A4 X7 d) v @.CurrIcon := "load";, D$ R7 o9 i! @8 C( U1 U7 @
GlobalDistObj := part.globDestination;
+ i" _/ g- H5 p1 W3 q$ s' E, Y assignLObj := rgmanager.rgAssignL;
$ W) W) W6 f" p0 U; e row := assignLObj.getRowNo(GlobalDistObj);
, R$ y: v+ X" k! p& K* ?5 m if Row = -1 then -- since 70) f+ H& _! S+ ^: b9 G3 _
if lan=1 then3 I: P5 {$ G% P7 o/ X' k# X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% i9 s% z) X+ e' a* U8 s! n v to_str("in der Andockstation: \"",?.~.name,"\""));. v$ [* k# \% q) D& }: u7 H5 A& v
else
! v+ C5 T* T) p* Z8 F9 y* i9 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 J) ~9 \: J9 M3 f+ `' U
to_str("in docking station: \"",?.~.name,"\""));
6 j6 L! Z+ C2 n3 v: e# r end;. d& Q! p# e* x g# r
else6 n- F' |6 z; g5 A/ _! U2 V3 d
@.Destination := assignLObj[1,row];
4 w- e* B4 Q3 P$ i# r1 f end;
. F f$ W: }3 a, W# i newDirection(@);
3 B" t/ b: g# a3 v# [, P @.HasOrder := true;% I6 e1 V6 j9 t# R* e# }
end;
* Y) x4 {7 u; a* ~: X end;4 s& [8 Q$ x7 D9 Y
end; -- of the method1 `7 }/ Z2 F" J7 {7 ^
|