/* called by: entrance ctrl of the object 'track'
( Q; v, z0 I( S* A1 Z" V( w*/
5 t/ Y' ]0 R# n- A& p' zis
" ?* N) i1 [" n" ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- E# T# b4 n4 K3 _5 t# ?
do
, N. D3 n" T9 W) |4 g6 U1 ~8 t0 P4 o Lan := rootfolder.Internal.Tools.AOLlanguage;
2 [, _- w- Y+ v/ h" ?7 C" m4 T; V if current = @.Destination -- else return
) ]. |6 k9 A" ?- j" K then% f& C1 {8 x1 P& ^/ s
@.Destination := void;, `2 u! ?3 }* z; z0 m* P
if @.occupied then
/ u G% P5 t5 y: X1 x" j+ G part := @.cont;2 [8 t( o8 C6 F% y7 u" N5 _
@.transpOrder := void;
9 a& V( X4 D4 ^( Q+ S$ Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! A% z+ ?2 X7 g6 U% m
@,root.eventcontroller.simTime);7 D4 L. x. Z+ x; t J
@.HasOrder := false;
# l" X# L M. P: K) H" l @.DrivingHome := true; K6 X ] `; N/ a
rgManager.tryToStartTransOrder;
3 i1 o9 y0 H5 t) a- J if @.Destination = void5 `! E- ?, b' R1 M6 |
then -- no transport order for vehicle @
' X3 q8 z- H7 s* `4 [ @.Destination :=
/ Z5 N9 {) C" ]5 Y( | x rgManager.nearestFreeStation(@,track.~);
; A' `% P* R& [9 ~0 ^" R newDirection(@); " C( A4 } U& q5 f( X* t) J! l
if @.Destination /= void then g, E8 C V2 g0 K h' V" _# ?5 @
@.Destination.NumReservation :=
2 _+ k$ g3 c* E4 A t' o% A; U @.Destination.NumReservation + 1;. S6 \ Y4 l* G% f& A W: ?, Z% f
end;
% L8 l& l; K: w+ J @.CurrIcon := "drivingHome"; q+ w2 a8 y& e
@.DrivingHome := true;9 G! r U5 m, a# w
end;" L+ i; O% o9 @0 A( m/ Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ F" H! W! r: M6 F part := @.transpOrder;
% c. _5 v3 ?+ p: n N, e+ }# z& c) C part.move(@);-- load part
, G( S5 @4 ]1 M @.CurrIcon := "load";
" q3 p3 B6 T X GlobalDistObj := part.globDestination;
' s7 k+ S% e( y( A5 M% e assignLObj := rgmanager.rgAssignL;
, ]! ~* n1 c9 P# L! [ row := assignLObj.getRowNo(GlobalDistObj);
2 R: I$ @% }0 {+ t7 M k8 i8 C0 D if Row = -1 then -- since 70% }1 x! {) v" F8 e
if lan=1 then( a. Z7 u5 I$ T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ d. z: e# x- k" M* o3 e to_str("in der Andockstation: \"",?.~.name,"\""));
* Q! m0 v( y1 ?. o9 F else
& [8 ^6 Q% g! Y2 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 W- T2 E% o* P; R. |) T3 T7 I4 }" {2 N to_str("in docking station: \"",?.~.name,"\""));
, u2 M: d9 ^4 g4 B# ] end;
( ?+ W, `. {: t( y4 }$ P5 Q4 f else
6 J1 K& ^2 F0 H8 i, U @.Destination := assignLObj[1,row];
8 Z7 R* h+ x' }* e) W0 \ end;
, h$ u1 N1 p0 j7 V6 ^ newDirection(@);
+ v- E: W0 p: Y! b% } @.HasOrder := true;
1 L0 J" L6 P0 Q% S r7 d+ m# c9 i end;9 _' T8 ?6 O" `+ t& |
end;) J7 O8 r4 |# D5 M/ u/ O
end; -- of the method( ]% @) n8 S: y
|