/* called by: entrance ctrl of the object 'track'
" E( k% N! ?7 O9 E6 p*/- P1 w% p3 x* k& |
is2 w0 H) Q* u$ a; R# j9 s0 E8 ^4 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* q, y) U9 V% e, Zdo1 _; U% Z$ T) ^* B+ V
Lan := rootfolder.Internal.Tools.AOLlanguage;& G) C% z1 e* \* q
if current = @.Destination -- else return! B- q! b& C& _9 q
then# |# z9 _$ j! m5 z8 ]
@.Destination := void;
2 ?' l5 n0 V" _ t. J2 [. E* v% g/ z1 Z if @.occupied then2 J* z8 Q! t4 Z' ^/ ?4 j
part := @.cont;$ r% k( _$ q8 z6 h5 o
@.transpOrder := void;
: E/ D0 ~; V! h3 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ?9 N6 C2 B" h @,root.eventcontroller.simTime);
5 Z/ U/ A$ I! u" c$ n @.HasOrder := false;
b0 _6 f/ h; I/ M2 ` @.DrivingHome := true;
# F% T0 W8 x; a% U& T" z) } rgManager.tryToStartTransOrder;5 I6 I8 Q/ X8 z5 ~) R8 S2 @7 ~$ [
if @.Destination = void, _9 O \0 A4 e- H3 p: W+ a5 C
then -- no transport order for vehicle @- C8 ?9 |/ @+ x
@.Destination :=
) l- [# [2 U3 w1 ^2 X rgManager.nearestFreeStation(@,track.~);: w( d9 T7 V- }0 c: B; ?, P
newDirection(@); , V% p* V# W8 j6 Q# ?: [: V
if @.Destination /= void then: |) E' ~! O4 F
@.Destination.NumReservation :=
$ J$ K0 e3 f0 o+ ?! U3 w @.Destination.NumReservation + 1;# K- ]4 ]2 [+ Q( }
end;
" q5 X4 r4 p) y6 E @.CurrIcon := "drivingHome";
2 h* H% n% `5 r( g4 K @.DrivingHome := true;
5 M( H3 P( y* C( i; h end;( y- E ?- Z% N& X$ k4 o: J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( V1 D$ q9 E2 x' ~
part := @.transpOrder;& W$ i9 r1 R j* q3 T; P
part.move(@);-- load part
4 b) t; Y8 }1 `5 c( o' K @.CurrIcon := "load";
" W( a% A$ [! C+ d' R GlobalDistObj := part.globDestination;
6 p/ f) Y& T2 P assignLObj := rgmanager.rgAssignL;
. C0 v. P! _. d% P0 C1 F) j" Q7 T row := assignLObj.getRowNo(GlobalDistObj);
* q6 G/ V7 p1 P# s3 b, c; [ if Row = -1 then -- since 70
- t! z0 O& d2 q) o. I. m: j if lan=1 then* Z' V: z+ i' S/ ~8 q5 _2 o+ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. A8 x2 W2 j, N+ t
to_str("in der Andockstation: \"",?.~.name,"\""));0 \2 ?8 X4 G2 X- ~* l9 w
else* j9 L, A. k9 x9 D! Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. N5 E$ [6 C0 Z+ w
to_str("in docking station: \"",?.~.name,"\"")); 1 m5 F1 O# @$ L' ` G: F
end;
' x" P! f7 ~' s' c else
1 O# d$ [' m$ _ @.Destination := assignLObj[1,row];
% }- o* G' B- ]& N* s7 } end;
# V3 i& }3 O* o) ~ newDirection(@);
- R% I0 P% e6 r8 h @.HasOrder := true;
2 W3 ~, Z0 i' R# b# L6 o end;
! K% w9 _# P; u end;
/ \ p. C& {* T$ \; Send; -- of the method1 ]0 n# r+ u+ i* ?+ @1 ^2 C3 O
|