/* called by: entrance ctrl of the object 'track'
$ B7 w ?: B/ L: Q*/1 F; o/ f" H+ j; `$ o
is: \# T8 R6 g& E+ n9 e8 b: u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; }2 I/ y" _) ~" ]do" t+ P! U7 y- ?: f5 y7 W7 q0 c
Lan := rootfolder.Internal.Tools.AOLlanguage;; `6 }. {' L! J) i, _
if current = @.Destination -- else return& w9 t, I8 g6 ]
then
* H& S! H1 L( G. F x% \; F @.Destination := void;9 \; g- M: ?: i4 o$ f
if @.occupied then. \5 \: F9 l& k/ z
part := @.cont;
1 L& n7 {& v" o) K @.transpOrder := void;
0 X4 f+ A4 s# V, S' f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 K$ |6 H% n7 J# j3 h& ]$ c
@,root.eventcontroller.simTime);, _" G: P$ g! J2 f: ~
@.HasOrder := false;
& j+ f( I: h5 h7 [ @.DrivingHome := true;
: F8 Q* ^" m: J A0 ? rgManager.tryToStartTransOrder;2 w' S# A4 e5 a6 o# a
if @.Destination = void/ w7 f) F/ e, S% B S9 Y
then -- no transport order for vehicle @! l0 |8 J1 K+ q* f/ h9 M
@.Destination :=
# g+ g) F+ n/ m6 X6 e rgManager.nearestFreeStation(@,track.~);# n/ r' N9 j" C) C/ q6 ?
newDirection(@);
7 ~8 d( ]7 V Z, K if @.Destination /= void then* p2 j; h7 I' V# Y
@.Destination.NumReservation :=
: t& U) E* M6 |6 A! X. o @.Destination.NumReservation + 1;
O3 {' F5 E; `( l* |2 s$ {3 v end; J, l9 Q2 w2 E& ^0 K7 W' N
@.CurrIcon := "drivingHome";
6 t; [1 X$ I1 U! v @.DrivingHome := true;( {8 z3 p- J" s1 {
end;* h; Y/ ~/ O# Z) d: {6 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ?' h% Z( P( x$ D3 F3 {: {8 s
part := @.transpOrder;; }% B4 A, }; M! C) L( C& n* L
part.move(@);-- load part
$ h6 q8 v+ E9 Q* f/ P* m& @. I- d# a @.CurrIcon := "load";
6 }- a' ~- m" T0 n% U" m GlobalDistObj := part.globDestination;
1 X ~4 h& {" d7 E3 o- b assignLObj := rgmanager.rgAssignL;
- |' J8 a* c/ c: Q; H& e$ z8 f row := assignLObj.getRowNo(GlobalDistObj);+ T6 J# ^& w3 a4 {0 p
if Row = -1 then -- since 70* {( e( j' s' ^0 P' b
if lan=1 then
) I% V* f) n- ]0 l- w& i( b/ [9 J5 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 |0 _. e V, }4 U. I* [
to_str("in der Andockstation: \"",?.~.name,"\""));
% @5 A' K& l. _: D# _ else
/ [& C7 N- t7 k' Z; h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 B- ~* S" p" E" H7 m/ n
to_str("in docking station: \"",?.~.name,"\"")); ) y2 {$ v9 ]$ `8 G. ]; A
end;% e& {- n$ C. x* p7 f7 `: Z
else
4 c: R3 Y+ f& g @.Destination := assignLObj[1,row];& G S2 j7 i9 V. F
end; ! j x- b! @- l$ j2 d/ Z( r
newDirection(@);
! f; u! o+ U9 _' o! z" v @.HasOrder := true;
# D/ H: B1 M9 [: E4 A9 { end;
1 b E: d, U, N- o end;2 [, e# S$ Z3 P" Y
end; -- of the method
9 o! b' }* z Y3 ? |