/* called by: entrance ctrl of the object 'track'
+ `- M" w# @$ L% m& U4 r8 f7 a9 n*/, ?: B% z& ^- @* m
is
$ L( T6 m) q. r$ I/ S! } part, GlobalDistObj, assignLObj:object;row,Lan:integer;: `3 w8 {" u! A8 R5 i. O8 X
do
: |, R, _. c* g Lan := rootfolder.Internal.Tools.AOLlanguage;
$ \% T. K7 W q3 _/ o: `3 J. r if current = @.Destination -- else return
3 `/ e; s5 L4 U3 c1 u A1 C4 ` then
# |/ z) x0 Y/ T3 b P @.Destination := void;5 \6 S& |. F, V* X
if @.occupied then- z1 z! z3 Z. j% A
part := @.cont;
$ z `+ {7 G% e' c* i @.transpOrder := void;; ~6 [3 m2 N& }8 R$ i! s, i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" S0 p5 E$ I' C% n2 A6 s @,root.eventcontroller.simTime); {- D0 R4 r5 @$ l$ [: {+ i
@.HasOrder := false;
3 O5 P' V+ v% U" p @.DrivingHome := true;
h- V7 x) \- B: r3 u D$ L/ C rgManager.tryToStartTransOrder;9 G; S8 V; m9 t+ h/ U/ m, {; [
if @.Destination = void
$ S' m, K# g* D0 V5 ]+ A. S" \. i then -- no transport order for vehicle @5 W0 f8 k( U4 j' ]5 W5 r7 l" e
@.Destination :=
8 }$ V& `6 W& d- y% _ rgManager.nearestFreeStation(@,track.~);
3 ?+ H8 X( Q* ]/ Z1 N newDirection(@);
2 D! B9 G$ N9 a* i2 g3 \; i if @.Destination /= void then
+ N9 V! D% q# X, L0 ~+ }. A; U+ E @.Destination.NumReservation :=
. y* u B+ E/ c8 }4 D, }/ U @.Destination.NumReservation + 1;& T4 g* k* G' X( H; F8 O$ W7 v
end; r' f* c! J3 E+ m0 m7 A6 [. n
@.CurrIcon := "drivingHome";0 \) S9 e3 A' V' G4 w4 M" D, y( C" p
@.DrivingHome := true;: B4 ?& y* G" \
end;0 v+ z1 e" E1 s4 c! I1 k. q, y; L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ }( W* @2 i1 {& ]
part := @.transpOrder;
" X- ?/ A3 c6 v. l part.move(@);-- load part* j. G# s: b! i+ f! w4 p. G8 ]4 j! k
@.CurrIcon := "load";
) P( E! @9 [. l4 j7 l GlobalDistObj := part.globDestination;
5 h( T7 C3 O0 p; p assignLObj := rgmanager.rgAssignL;
3 d6 w7 ?7 Q' g {) n row := assignLObj.getRowNo(GlobalDistObj);
7 i; S& a) |+ t3 D: e7 f if Row = -1 then -- since 70
. v# V) {. v1 c+ a5 C- K. C if lan=1 then x( k: U( W0 A+ G9 q8 ]6 Z8 A% }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 `3 r" J$ f5 V; {7 y. R8 r" \ to_str("in der Andockstation: \"",?.~.name,"\""));, J% |. X0 [: z) c4 E+ c7 I7 V0 F* n4 I
else! s, O5 D4 D$ Q' C( o, s3 z' U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. I! G9 c+ d l" y
to_str("in docking station: \"",?.~.name,"\""));
# f. k5 {; T( c2 p7 B, ^ end;, Q* w1 [8 H) z* ?
else
3 R+ W1 w; @/ V5 \0 N, ~ @.Destination := assignLObj[1,row];7 i: U- N3 j1 c
end;
: x ]0 T! e0 o, L0 V$ P4 B% l4 g newDirection(@);) A7 o- |1 }. S0 G
@.HasOrder := true;
( d3 }$ J/ b# B end;; a# M" z3 i5 I$ Z" I
end; h8 r# G# |; v2 P: _
end; -- of the method
4 i$ q4 W2 t2 t7 j |