/* called by: entrance ctrl of the object 'track'( {1 g6 V( }' b; k" w
*/: p) {" z6 s, s9 B
is6 E9 ]2 Y1 y/ `! O* X K& ~2 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! K+ r( k7 y! M! \. X/ Y+ h
do
, h9 M8 v3 o7 N' v$ H Lan := rootfolder.Internal.Tools.AOLlanguage;
) H8 A# }. J K if current = @.Destination -- else return
) c- o1 F: ]1 n% ~3 { then& {; M% v7 f" U$ g2 g$ S/ }
@.Destination := void;, w% E( r! U' w# h
if @.occupied then
1 g" O d X6 W, o% Z2 m8 y: d e part := @.cont;
4 f* m6 j- U* {5 p @.transpOrder := void;
8 `' A* Y {/ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, l& ~/ T9 R1 Y/ u
@,root.eventcontroller.simTime);
. k. d6 k5 z O# m/ z) L @.HasOrder := false;( P& ]' W9 ^/ B4 e, f, Z: ^% T3 }
@.DrivingHome := true;
! G$ g. E! e0 @ rgManager.tryToStartTransOrder;
6 ^' Q) J# v8 B if @.Destination = void6 a1 m+ A2 `" N' i+ ]
then -- no transport order for vehicle @4 g& P: \! n4 H( K \
@.Destination :=; W4 Y- t+ I( I
rgManager.nearestFreeStation(@,track.~);9 f: [0 o* g5 ?# I3 @; q9 {
newDirection(@); . s( N7 g5 s! d, {# t6 K% K8 ]
if @.Destination /= void then
+ M0 u1 j7 d. v. r @.Destination.NumReservation :=
* m, Z% p8 P9 G x! _ @.Destination.NumReservation + 1;
* r# f; X8 k% Z; [* ~ end;
0 V; m |1 x+ B' T' d w @.CurrIcon := "drivingHome";
8 [6 c% ]# H) A1 k' D @.DrivingHome := true;
5 B7 E# |4 J; x# s' a" i+ a end;
) V% i) P; |+ k: L. C else -- the vehicle @ is empty, both vehicle and part are in the same dock station: |8 g. q( L; E a: C3 q1 C/ Y. ?
part := @.transpOrder;( ]4 h- t- y/ ~: O: b
part.move(@);-- load part% o; f _, ~2 {% v- J+ L
@.CurrIcon := "load";
" I& ]& E ^. | GlobalDistObj := part.globDestination;6 q/ [ ~8 D& }5 N6 t
assignLObj := rgmanager.rgAssignL;
$ ]% `% o( J( H$ \0 D row := assignLObj.getRowNo(GlobalDistObj);
0 o1 h. t- u! v. m) A3 d if Row = -1 then -- since 705 u1 Y3 a, L; L2 P6 v$ g" h
if lan=1 then1 g4 [' a% s0 S" P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 [$ i) w* c, \& m% @
to_str("in der Andockstation: \"",?.~.name,"\""));
) h% ~. j4 ?- q" P7 y else
, Q+ p4 C% A/ `$ s9 t6 X6 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. y% T) j) g; K0 k2 |$ e5 U& U D
to_str("in docking station: \"",?.~.name,"\""));
9 y* O% X3 W1 g' |6 g end;7 n" @6 e6 H& d3 J
else
1 ~+ a+ {8 z3 q9 S1 T! l# l @.Destination := assignLObj[1,row];
& B9 a" ?- J4 c/ [" f9 t end;
# l5 \! [! R" ?! G( ?! X- e newDirection(@);/ R4 M* N8 s" V% e" S
@.HasOrder := true;9 ]$ Z% a3 W& h5 B
end;
- {' T! o7 T# w# b! O; W7 M! ^ end;
& I! j2 Z5 U; V3 }) w& f, zend; -- of the method* n8 o# J6 t: d' q6 s
|