/* called by: entrance ctrl of the object 'track'3 i4 Y2 t* ]1 Q' ?! O
*/
, t) |. [- p$ P$ A+ V, z& iis
- G0 I8 t0 z$ a- U% O# V2 |1 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;' E% N# h' y; }. _0 ?9 t
do' t( {: e$ Q d1 F' W( |% |; B0 F
Lan := rootfolder.Internal.Tools.AOLlanguage;9 P1 I) x$ T) L& e) M
if current = @.Destination -- else return
; c! W0 o9 y: X9 R4 T+ e E8 | then; u& P/ B5 c) r- t# Z- M& c
@.Destination := void;
& L( J' X* K* |. D, J! o. g if @.occupied then7 W! q) ~- J5 L" @- x
part := @.cont;
% A. o. @. X C( g8 Q @.transpOrder := void;% z7 r( Q6 ]5 \7 z! A8 N2 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 f- z1 ], N' ~- h9 D) b2 S
@,root.eventcontroller.simTime);* j! {0 l" }% g* b6 X
@.HasOrder := false;8 z' L) M3 Q1 B
@.DrivingHome := true;
5 ~- l5 ]) a$ H rgManager.tryToStartTransOrder;
/ z3 |! [* J' e* b5 d6 o$ \ if @.Destination = void$ ?( d! U- S- T* j9 f
then -- no transport order for vehicle @, y- `8 g# I( G0 z8 b* a; d
@.Destination :=
1 t+ |1 p. Z2 @; l rgManager.nearestFreeStation(@,track.~);! R1 B0 j; c; ^3 \
newDirection(@);
9 ?- B8 V2 M- T! g: b; T5 h1 j if @.Destination /= void then1 G" X% }* k0 c: L
@.Destination.NumReservation :=" E; j3 s5 y- R2 f! b9 {8 R& N {0 b4 I
@.Destination.NumReservation + 1;% `; C U' ?, |( u7 e. Q/ s' ^
end;1 Z/ m3 S9 s- e, N& Y
@.CurrIcon := "drivingHome";/ s; q& o8 j. o1 Q- O
@.DrivingHome := true;
9 c% k, R8 _, d( N/ Z) m end;
, X8 w! K6 y0 |9 t% m0 E5 h5 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 _- g) d" y) s+ n3 K
part := @.transpOrder;, F1 T, q [0 c4 @9 }% X
part.move(@);-- load part
5 v5 c6 `& V7 G, a/ n$ P @.CurrIcon := "load";! {1 L ~. S! R
GlobalDistObj := part.globDestination;
* @1 h' r7 d: r6 @! m1 Q# r5 [# W2 s& K assignLObj := rgmanager.rgAssignL;" g* z6 R1 e% K% Q' y. F" c- m
row := assignLObj.getRowNo(GlobalDistObj);
4 Q1 c0 N- N1 g( } if Row = -1 then -- since 70' P3 A. {$ `: J
if lan=1 then
; b7 s8 T6 U# q% w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 y) |$ m m0 A3 d to_str("in der Andockstation: \"",?.~.name,"\"")); q! `& k& Q" t# a# C
else' X- B7 k! M5 N: h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 [9 f& P0 C8 P# s to_str("in docking station: \"",?.~.name,"\""));
# B) X; Y! o; v {% G end;3 \0 A9 C8 |4 \% \
else
. S# \% t- D. I4 d @.Destination := assignLObj[1,row];
9 l( U, J( J) V7 D3 ?# | end;
, n/ n7 F& g& K2 Q newDirection(@);
* L8 n) c5 j6 p: ~% g9 X0 K @.HasOrder := true;* J( a7 E: r, e3 v i# K
end;7 ?: H1 `$ y: \5 w
end;: K' Q# [5 `" G, ?
end; -- of the method5 g }8 {1 c+ J! B5 q
|