/* called by: entrance ctrl of the object 'track'9 s8 U& [+ n$ v
*/9 F1 u- U L1 ]9 I& n$ X2 |/ o+ E& t
is. C; B+ n' a- d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 Z/ H7 p$ i% udo, t) [9 K" L D! B
Lan := rootfolder.Internal.Tools.AOLlanguage;) q9 p1 {: o/ D+ T
if current = @.Destination -- else return2 Y8 {# K `9 p3 j! D( f+ t
then; w' r Y- [; O$ C2 H
@.Destination := void;
# u F% Q/ t9 t2 J% P, I if @.occupied then6 C& W- k" K' _3 T
part := @.cont;5 W* u/ f2 @3 a9 {
@.transpOrder := void;2 F8 u8 b7 q1 s0 k3 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 s- D/ p( z5 n$ q% W1 \ W @,root.eventcontroller.simTime);
# T1 m. P: X" A! G1 t" I# g4 E5 Q @.HasOrder := false;
6 ]1 b+ U. b* U$ k1 `1 w$ j7 g9 h @.DrivingHome := true;5 r, G+ Q3 v3 F# S9 k" S
rgManager.tryToStartTransOrder;( y7 [! ?3 u: {
if @.Destination = void1 d" Z$ e) o! m3 }
then -- no transport order for vehicle @0 v# S- m+ i) M0 v+ {0 c5 |/ ] N' j
@.Destination :=0 ^# H5 ~! }& _! E6 H
rgManager.nearestFreeStation(@,track.~);2 U. p+ O$ ~( n. V) X1 F0 z
newDirection(@); % c8 ?$ k, w' | N- w
if @.Destination /= void then1 @, L& l) M4 ^3 \' |
@.Destination.NumReservation :=' O- Q1 U2 ^2 q3 I7 I+ E) @; @
@.Destination.NumReservation + 1;9 X0 B, M9 e3 I, i: R
end;0 G G+ X. `4 S" V
@.CurrIcon := "drivingHome";! [' J9 R. Y& ~, d
@.DrivingHome := true; ~5 j( |9 t! s, `, |* D
end;4 ^# D& E) q& Y1 c# z" _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ l" c4 g! h) j7 f% ] part := @.transpOrder;
7 [8 L5 P: ?- i part.move(@);-- load part
$ c# h: Z+ g" I" x: h3 T @.CurrIcon := "load";
( h: s( ~4 I5 ~0 L# S GlobalDistObj := part.globDestination;8 J% w: O8 {" F! E% `! E; a. a: d
assignLObj := rgmanager.rgAssignL;2 ~, `# U$ q: d* N4 i
row := assignLObj.getRowNo(GlobalDistObj);( }6 P, r2 E$ S8 w
if Row = -1 then -- since 70
( k& n' a1 Z, Z1 y; S# T if lan=1 then; ]; i# t6 Z% Q9 G! z0 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ a: ]1 G j" V0 ?9 m
to_str("in der Andockstation: \"",?.~.name,"\""));
# q& ]4 n6 I: Z- d4 j else7 S5 n) m3 U# B2 }/ ` L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' u! `1 j, S4 B% o% _# ~
to_str("in docking station: \"",?.~.name,"\""));
: b$ m1 f- }1 r6 C8 D& m" C, V end;0 F9 @2 J1 d# t- y1 b+ V e( D
else
# k% T9 ~% ]# ^$ i: T, r# u @.Destination := assignLObj[1,row];
, |; X- C3 W' a9 j end; 9 o' k; o, w q4 I' w7 b: h% V
newDirection(@);
2 Z9 B0 M/ Q9 P+ a8 |. h @.HasOrder := true;. E2 N; ]# M; Y# U2 P; C2 |
end;
3 n1 I/ U9 V* x: J" l5 @; u, V end;
5 n5 a' x* n4 M: y/ \ z8 q& z3 Uend; -- of the method4 I9 S: s" }, z. v
|