/* called by: entrance ctrl of the object 'track'
2 b9 H* }) M9 U) H*/0 i2 s9 P, G9 ] d; h9 j
is
8 _2 k, g, J) Z, I3 o( z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& F: s* R' ]9 J2 i# {do* z5 [* i4 M5 k2 @7 `
Lan := rootfolder.Internal.Tools.AOLlanguage;
, Y3 q, k' f8 l if current = @.Destination -- else return
- E' R! v0 d* C2 L+ r. z% U then
6 n+ _% D( C) T3 u4 K( v" d/ w @.Destination := void;
3 i; I( ]' J! S9 Q5 L& X2 U* j if @.occupied then) v- F" U0 P6 f' P+ z- C
part := @.cont;
$ Z0 b6 z' d" h% j( Z6 ~ @.transpOrder := void;
7 G4 v% d! c: G+ Q* I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. C# F. m# }8 e/ T3 R" C- `
@,root.eventcontroller.simTime);+ [! m. R1 E: s) D) [! g! m
@.HasOrder := false;3 m9 C, Y7 q. }9 c
@.DrivingHome := true;
0 m+ i- z( |: H' V4 F3 N6 g rgManager.tryToStartTransOrder;/ S0 X# B! E4 `* ^0 A9 l+ d- Y
if @.Destination = void
# p' c& @4 a$ }. }' j then -- no transport order for vehicle @" J r- r( N) J
@.Destination :=
6 Z2 S/ e9 j& ~3 n9 E6 ] rgManager.nearestFreeStation(@,track.~);# R: n* Q6 W/ A$ q# E( |
newDirection(@);
% C1 ]" @7 n, ?/ L if @.Destination /= void then& ^0 l6 k5 s4 z7 g* o5 k5 S
@.Destination.NumReservation :=
5 K& H4 c8 }9 F8 a4 F @.Destination.NumReservation + 1;
) m5 z- l' B+ @$ d1 z end;
( K# h( s5 _ i. D @.CurrIcon := "drivingHome";
* ^/ y# u- m% R @.DrivingHome := true;
f$ o9 o1 l- F" D- H end;% E% g$ h& i: ]8 h: z' u! w! X0 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# ` W4 _7 Y1 a+ a' F# t& Y8 k) W part := @.transpOrder;
0 r/ S. y$ v6 g% F part.move(@);-- load part8 v/ I) H$ B d
@.CurrIcon := "load";
: ~' h7 M/ q2 p9 g& Y GlobalDistObj := part.globDestination;
0 D$ X W- h( _: b9 k/ f q5 _ assignLObj := rgmanager.rgAssignL;
- M: T% h. z3 v7 q4 ?+ D$ u row := assignLObj.getRowNo(GlobalDistObj);5 N: N/ j7 y' }
if Row = -1 then -- since 70, ~# N4 S; F/ c0 i# ~: X
if lan=1 then
3 n1 Q$ J5 m2 A: k3 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* J$ D/ U2 ^( k6 c8 B
to_str("in der Andockstation: \"",?.~.name,"\""));
I, c/ r5 y$ F4 {/ F, \. j else0 _: ]! {$ K9 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 y9 s& l L8 j4 C' v. b to_str("in docking station: \"",?.~.name,"\""));
2 Z8 ~# h) m; J+ U. \ end;3 f' ^) g" R7 B8 D; G
else+ f( s! k- m) r
@.Destination := assignLObj[1,row];
% F* m7 t1 @! z# [. M/ y) u+ R. u end; 9 A/ @7 X L; h& m5 Q) p
newDirection(@);
/ t5 L( S" w& ] @.HasOrder := true;* V( a6 u. s& i& O n
end;2 L4 A- Q! [6 P# ~2 i
end;; R; t. ]8 k6 I5 k7 R B6 R
end; -- of the method( I5 V1 ~6 F u" e8 H- m1 z4 ]' r
|