/* called by: entrance ctrl of the object 'track'
8 |: e8 M* Z/ S/ R3 U: l*/* V7 i, Y( M; d% a P4 i
is- q0 o# K- O+ P/ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% z3 e+ X- c: z+ [0 ydo" r: ~0 s p* W: ]9 \. y& t# D8 N
Lan := rootfolder.Internal.Tools.AOLlanguage;; I z; K n6 U2 L w3 }7 h8 l) }
if current = @.Destination -- else return/ t% d( i/ Z; Y k9 |. j1 Q2 J
then
7 S0 j" n# Q9 N. r+ ^1 a5 @7 A @.Destination := void;. p8 j { _5 F% m* R0 M2 ~
if @.occupied then' t1 C J: t @
part := @.cont;6 F7 d" R0 x) l/ N0 X8 S5 e
@.transpOrder := void;
" i# v* k$ F- Q9 r: H7 @4 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) `3 {7 \6 v5 L1 c2 J9 J7 h @,root.eventcontroller.simTime);9 D" ^0 ]6 D, ?, E
@.HasOrder := false;
& i3 x) b( C s$ {$ g1 ] @.DrivingHome := true;
% y& g( V' p# ]" U2 T6 ? rgManager.tryToStartTransOrder;
/ L. r- p% S2 _; t9 r. g if @.Destination = void5 Q& z: o7 B, R* X1 @( {" p5 Y! S3 h
then -- no transport order for vehicle @3 b4 Q1 g+ M# W( d) s
@.Destination :=
3 F' l: h0 W- [8 b rgManager.nearestFreeStation(@,track.~);
! S( a( J, q. m5 K5 a5 i5 t newDirection(@);
4 V- ^- k; ?5 q if @.Destination /= void then
; s, C0 t, }2 i7 L @.Destination.NumReservation :=
$ G. U$ U4 b: B% k* Z$ [# | @.Destination.NumReservation + 1;
; C% @$ [$ o/ A3 U' \ end;
' X7 u9 l# b- Y# _4 ?, }- V( ] @.CurrIcon := "drivingHome";) A! W9 e2 s' e" I1 V/ p
@.DrivingHome := true;
0 r x& r! ^2 [$ K; X+ v end;/ g, }- s H- L1 f1 H# G V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- P9 H' n' ~: I) E. V part := @.transpOrder;4 c, v- v; p+ G+ f. ?
part.move(@);-- load part
8 g: u; t2 u! M! @7 o9 V* \ M @.CurrIcon := "load";
! d& ^# e6 B' Q7 h1 E, H GlobalDistObj := part.globDestination;
, p* H5 t" P5 j$ l assignLObj := rgmanager.rgAssignL;
* h- ]6 L6 t, j7 k' g$ I1 g row := assignLObj.getRowNo(GlobalDistObj);
2 R' n5 R5 E7 ]9 w if Row = -1 then -- since 70
7 }- N/ N4 x2 x if lan=1 then' B$ l, I) P! f2 I. {: v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z, E9 S, {& x to_str("in der Andockstation: \"",?.~.name,"\""));9 d1 T9 E2 J( e; y+ \1 _ ]
else
6 B1 {7 z$ y2 Z/ d: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# m4 S4 k: N- u to_str("in docking station: \"",?.~.name,"\"")); 4 B% o& N7 \ f( h, d) {
end;
! [- ]' e! [5 c7 x else9 l# P; }1 N, \
@.Destination := assignLObj[1,row];4 l7 Z0 G- p4 h) v7 a8 e7 c0 B
end; ) k4 @# S& K. M* J" ^ E! S
newDirection(@);
) i' l- ]( T! l @.HasOrder := true;' {" T0 o/ W/ `$ [9 f
end;
4 h$ _' a# K- n( K end;
8 ^( q+ Z' U$ q. [) [end; -- of the method% ^$ q) T9 s+ a1 S/ ?
|