/* called by: entrance ctrl of the object 'track'
. w5 }6 j8 I6 k" {*/4 X- L3 V; d F6 B I" Z O
is8 K, R2 e, N! g. n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! w. _% T) w* G
do
2 I% m4 K" c6 u( g; H) V+ a Lan := rootfolder.Internal.Tools.AOLlanguage;
& O+ T. s. L" S4 m$ K if current = @.Destination -- else return4 ]0 R2 n8 H' t7 @5 X' y' L( w
then
4 A+ T. W, R2 k! `3 n# y @.Destination := void;
) Z+ @- @8 w( ^( F4 x; U4 ~6 @: W if @.occupied then
, S* g d6 W, u: Z, q, [7 x part := @.cont;
" M$ L1 t! ^2 I# M @.transpOrder := void;& M! u# z; A. N7 J- E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," j$ i3 y9 Z7 J1 ^
@,root.eventcontroller.simTime);
5 [) I9 X0 F# a+ V: V4 {! \ @.HasOrder := false;
0 f0 A8 R7 u5 s; P A2 v4 m n; I) o @.DrivingHome := true;
0 q- p5 b) q! t- W6 y rgManager.tryToStartTransOrder;
0 N, Z7 r( p( Z: E& h2 d if @.Destination = void
3 y- g, ~0 ^% O$ D9 V then -- no transport order for vehicle @
% U1 I- \7 v4 q; h @.Destination :=
1 j# V3 J0 N3 m1 V( [, g rgManager.nearestFreeStation(@,track.~);
, H# T" L) \: y" Z7 V newDirection(@);
3 ?/ ?- i5 l0 M' X8 z if @.Destination /= void then
& u* E/ G3 ~6 A; h8 k c @.Destination.NumReservation :=
[7 h0 Q: S" Q @.Destination.NumReservation + 1;
( m; n: e8 v. i2 s* U* O( N+ M end;0 h* _' F0 u0 M @6 j2 t8 }
@.CurrIcon := "drivingHome";
8 z- `9 O) O. s4 \% d( N' X) X' @ @.DrivingHome := true;9 k& {5 ~% }1 |$ {8 P
end;
* P/ Q( \9 i& u8 Y: f3 \8 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ W# S+ `' _: R( C: W part := @.transpOrder;
7 ~% `# P( ^0 _- h% K1 [5 |! i part.move(@);-- load part" K) N' R ]6 W5 @7 ?& s4 ~. o
@.CurrIcon := "load";, L! w0 R& h7 C8 B! B% W
GlobalDistObj := part.globDestination;/ l3 W% S( n& O5 _3 i$ i& a2 V/ Z6 o2 a
assignLObj := rgmanager.rgAssignL;, ^/ e4 C. K$ d
row := assignLObj.getRowNo(GlobalDistObj);0 d4 X9 |5 E$ V8 K" X
if Row = -1 then -- since 70
% H- \$ f7 N7 _8 m F; J$ G2 X if lan=1 then
0 ~) q% D& R5 r6 S$ k- E& [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: r: d' K3 {- C+ O$ b. m5 C
to_str("in der Andockstation: \"",?.~.name,"\""));
) I: c9 F8 S! m" N t else4 V9 e, Z6 S# \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ b" `: g8 _9 o( Z e
to_str("in docking station: \"",?.~.name,"\"")); # `; o! l; Q4 ?
end;
0 F5 B" r1 C3 ?- [( y else& |- p1 d) _" P6 q- a% U7 q+ T- {
@.Destination := assignLObj[1,row];) u8 c! R1 {. p* m" e- c
end; . d2 D5 T. J D% T, X) }! v' O$ U
newDirection(@);
" P8 l% `: d7 L# W# S% i @.HasOrder := true;
* ?- T% A/ e6 ]; L+ ~" \! x2 f end;
3 L% i; |$ c- c) {6 c) w end;9 `2 H$ u1 T4 Y2 n6 ]- i8 G- i" d
end; -- of the method
, } C% w' n5 p+ { |