/* called by: entrance ctrl of the object 'track'7 p- Q; f v r/ g; G
*/; `8 O6 U4 r# T
is
, X+ Z' g! A" ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 N6 P2 F0 g8 x- zdo
" b' [4 G: h' K2 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
H6 U/ ?$ G) C+ Y' t if current = @.Destination -- else return- U0 p+ `' m6 k
then
! N0 e, ?& h8 _' I @.Destination := void; H$ [6 U0 x+ J6 ]
if @.occupied then9 s- U0 J# Q! v) S" k
part := @.cont;
% Z( i K$ m6 I- A4 _; [1 A @.transpOrder := void;( d, R- S9 m$ L/ j/ ?" K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! l% e4 J9 `% U @,root.eventcontroller.simTime);% t" h0 h& X& p, B
@.HasOrder := false;7 i/ b; d! h( e- z* P% J5 Q" M$ M
@.DrivingHome := true;
Q( Y) v( f' C, J9 R2 v+ R: \7 B rgManager.tryToStartTransOrder;
, X6 x, ~3 {& E) T if @.Destination = void1 l7 A# m x w2 D; d& y
then -- no transport order for vehicle @/ G6 j2 o# s( W3 Y. L" {$ Y
@.Destination :=9 }$ u" h, r3 {1 d. L8 ~, S/ n
rgManager.nearestFreeStation(@,track.~);
( o" ?' `( z( E3 H newDirection(@); ( E6 x# @) i$ u
if @.Destination /= void then6 u7 X* i: n! t) i$ X. J
@.Destination.NumReservation :=* T8 N N! I8 w& t `& U
@.Destination.NumReservation + 1;
$ l/ i0 T- F9 E" c7 l end;# H3 r, R8 y/ r) U& ]% {
@.CurrIcon := "drivingHome";
1 c$ F/ v; u& ]) C8 j/ p7 l% B @.DrivingHome := true;
. i4 d9 M2 H2 E7 X5 J) E# G- { end;
% }$ N. `) [$ o2 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station J" s3 n# W' s f. ~/ Y
part := @.transpOrder;, w; o, ?3 u5 y: Q
part.move(@);-- load part8 R3 ?) Y) y! L4 F; G/ C
@.CurrIcon := "load";# l8 T0 ]+ o- y5 F+ E
GlobalDistObj := part.globDestination;
- q! c, f: r- ]) r1 r. T assignLObj := rgmanager.rgAssignL;) @2 A7 J& A, a$ ]( O
row := assignLObj.getRowNo(GlobalDistObj);
& S& b7 A, }1 e) J) d' W9 \ if Row = -1 then -- since 70* w: l4 h" R/ A4 G6 ^
if lan=1 then
- Y( p/ z6 R0 \5 A$ K% R- k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. y/ r/ j4 D- R( R- G& d. ~ to_str("in der Andockstation: \"",?.~.name,"\""));" \! h) r4 m0 Y6 e, P
else9 |' O* H0 Q# g- c9 D# u) G/ H2 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 j9 o) Q9 U, o7 v% \% B to_str("in docking station: \"",?.~.name,"\""));
: [2 | ~' [# ^3 }7 N6 ` end;0 F! h; m* E* b7 m3 w* h
else6 }' g, Q5 \2 R* i
@.Destination := assignLObj[1,row];- S6 L1 x' l. {. Z; W) A3 S7 \5 w
end;
) S; y6 d7 ^6 Z. p, n& i- D newDirection(@);
5 B2 A4 ?' U* m. b @.HasOrder := true;
1 r% w9 w* `4 u end;
" ^! I" i$ O8 { B# S1 P3 e end;
* q. B5 G, J2 G7 h# M9 r9 ]0 U6 Aend; -- of the method" C4 o0 E. P0 x
|