/* called by: entrance ctrl of the object 'track'' x- y% L1 B* J/ L$ q
*/
8 X" |" c4 f) lis" P8 V) O1 u# _' V9 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. W$ P- k/ v& d" C6 R' x% w
do& W0 ~7 c9 D" ^- r2 _
Lan := rootfolder.Internal.Tools.AOLlanguage;
; M% |. n' C9 S2 `+ f) p) _' M% | if current = @.Destination -- else return
: U; `) u0 x3 p l2 z' K then1 Y }8 G% J ]( W6 G1 }
@.Destination := void;. ^( c4 A+ l/ U
if @.occupied then
2 ?2 j8 Z& }; o1 ?& }! W part := @.cont;
% f7 ~ C! t" A b9 z @.transpOrder := void;
: X; m5 `' [- I: y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. ~4 C( g5 s& Q1 M+ L# K; [" i4 H% x" N @,root.eventcontroller.simTime);
( I! j, o, K5 C g" S* N @.HasOrder := false;
# F: x& p* v: C, K& p, X @.DrivingHome := true;
m$ m4 f4 n& C. K rgManager.tryToStartTransOrder;
Y8 V; p( ^; O& W if @.Destination = void- {9 |/ }; U# D; r% R: {7 E' ]
then -- no transport order for vehicle @
! c3 j+ u' E& P1 m @.Destination :=
8 P, P {4 _/ Z" T- m rgManager.nearestFreeStation(@,track.~);0 u1 L* B! L5 h, d! F8 e
newDirection(@);
q B$ ~( L; D1 A if @.Destination /= void then
) R: G' S- `$ k8 v% d @.Destination.NumReservation :=5 [8 z& h. [9 |3 L8 W! a: J
@.Destination.NumReservation + 1;
% E; e3 Z% H1 K9 W end;+ f% ? h% s& Z: d9 Q3 v* C; h
@.CurrIcon := "drivingHome";
5 h0 e1 o/ }% u) ] @.DrivingHome := true;
4 c0 v0 E: `6 _9 P1 Y end;- M; B) ^0 J# q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; U, ]9 Y( \# G5 h1 z* m& E part := @.transpOrder;, z; m2 ?& U- v4 o+ i* h
part.move(@);-- load part/ J. \2 {$ c; [6 N
@.CurrIcon := "load";: W& \% F* q2 S) N- e) O) z
GlobalDistObj := part.globDestination;
1 R2 p+ b! D/ ]- m assignLObj := rgmanager.rgAssignL;
- {) N1 @7 `5 B6 n! k/ }" j3 K row := assignLObj.getRowNo(GlobalDistObj);
* n" E- h! v* ?, X5 I( o3 ` if Row = -1 then -- since 70
0 }' t1 ~% T n$ G3 Q+ |9 ]7 c if lan=1 then
, Q# J3 k: I+ g' {2 n4 X& i* v9 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 {" P# h' {, [/ h- O( g1 z& s
to_str("in der Andockstation: \"",?.~.name,"\""));
$ v. {8 J/ R5 S. H/ V8 Y) f else
' }( ]2 `* ?. w7 B( F3 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 `0 s+ B) a% n7 q" W9 o m' ^% I
to_str("in docking station: \"",?.~.name,"\""));
6 F6 u) v, s6 }) T( J5 k end;/ g' p5 C# W) C& N3 M
else
$ q6 K1 o4 ?3 T8 G% X m" t @.Destination := assignLObj[1,row];: @ _5 U% v& n5 f7 A: U
end;
& j) Z; @/ r' j9 G6 l9 o newDirection(@);
* T2 H" u0 m' I, E# W: ~7 p/ s1 w- | @.HasOrder := true;
$ V$ s5 m& n' f4 ? end;
& C) A. }+ N+ M# i( G end;
3 p0 F1 \8 G/ O1 cend; -- of the method
- E6 W D) ^* R+ j. X/ K |