/* called by: entrance ctrl of the object 'track'" K( R) H% @3 }
*// E, l% E: @1 \0 F2 v2 k
is% ^- ^3 t t6 }! n% b3 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ~4 L$ v) o5 l% L9 Q4 I
do/ y) p" O& h' T+ t
Lan := rootfolder.Internal.Tools.AOLlanguage;0 f3 k9 X& ?/ g3 S( l1 _
if current = @.Destination -- else return
3 ]7 R% F* s$ C; ?) x8 m9 s then9 z# Y1 G9 N; f3 F$ ?; \, {$ {- x4 w" m6 J
@.Destination := void;1 L1 x5 {- M. y! d& i
if @.occupied then
$ N* X: Z4 I, I6 I part := @.cont;( p! M$ h% U# I" p; k1 ?5 w* J7 j
@.transpOrder := void;
- i) C& A9 e9 w2 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" I9 s7 t' C7 u0 y: l% @: J @,root.eventcontroller.simTime);
8 u" w$ H; \: w7 q( { @.HasOrder := false;
- j) s ^/ k$ @9 r @.DrivingHome := true;
7 e( ?& j) w( A" J# J0 ~ rgManager.tryToStartTransOrder;( ^4 y- K% u( [& w, B' ^: G7 ]
if @.Destination = void
& d4 d8 D; |" \8 ]& q5 e then -- no transport order for vehicle @
2 l8 ]2 Y$ y8 T# b1 Z9 o7 N$ T- Q @.Destination :=
) C) @5 w) r+ X. Z$ l rgManager.nearestFreeStation(@,track.~);
7 X" w" t5 q) p6 J9 n T newDirection(@);
+ m# |& w) H7 [) Z2 u1 b! l! v if @.Destination /= void then* F# H* y3 |! {3 x6 t5 l2 _4 t
@.Destination.NumReservation :=
4 E7 D6 E. I* Q' W% c: I. ` @.Destination.NumReservation + 1;! c9 s) u' I3 j. z
end;
* V6 E- I% H: n9 x @.CurrIcon := "drivingHome";7 d( ?9 a7 G0 c3 w
@.DrivingHome := true;
" f& p6 T' j! B end;0 {/ v3 C/ [4 F6 f$ }/ u# E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Y* x1 v* T/ H$ C
part := @.transpOrder;8 J: o" a4 N0 |$ t! C2 g& B
part.move(@);-- load part9 ]7 ] M$ j3 ] Z+ [5 d+ j
@.CurrIcon := "load";
; R$ r: b+ C' x" S5 s* w3 S GlobalDistObj := part.globDestination;
6 U, ]) k) t+ b: y assignLObj := rgmanager.rgAssignL;
7 C- x' D9 F7 ~1 ]$ r% x row := assignLObj.getRowNo(GlobalDistObj);; y* u3 |5 |9 Z `
if Row = -1 then -- since 70
2 l. v, u1 o5 F& w if lan=1 then
5 Y1 ~3 P S7 F* e: q3 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) e8 d0 w, S ], d) G
to_str("in der Andockstation: \"",?.~.name,"\""));5 } Y% r. w2 F8 X! ?) V7 d+ q
else( M" W5 d V9 G) `- i6 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. e- Y) e: D: k p
to_str("in docking station: \"",?.~.name,"\"")); 3 a1 ]3 m$ Q3 n; x+ Y
end;6 G/ i/ y( v1 V, t6 L
else6 s ?" G* H# ^) w% V
@.Destination := assignLObj[1,row];9 k& T0 y, l: k3 W
end; 5 g3 ^! l* E3 }5 A% X
newDirection(@);( O; w0 {3 l2 o) i, J
@.HasOrder := true;3 Q4 ~- j2 l3 a# r; L5 @& ]7 V8 h0 ^
end;
+ w1 w( n* M. d" e8 F end;7 y- v/ v3 |7 F/ k3 c
end; -- of the method
+ |' \3 {$ i4 H2 [: s: n8 Y( T$ p |