/* called by: entrance ctrl of the object 'track'+ ]) d8 r5 k' N/ C( z, X- I8 k$ u) q
*// Z9 D" A0 G# q
is
9 ?6 }& c- [' C8 V. y# b part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 F: f7 ^- |5 T
do
0 c& _) U3 `, c9 m u" a Lan := rootfolder.Internal.Tools.AOLlanguage;
( |4 C1 w1 v$ P/ l/ g% ^ if current = @.Destination -- else return6 h, T2 Y% ~2 n1 p
then
, V7 E9 t6 o9 o; M; K/ @) q @.Destination := void;9 M# b: k& R8 V1 H& [- N1 q" Z- i
if @.occupied then
/ U, D7 a5 ~0 ~6 Y part := @.cont;) _& a$ ]) o( m$ a4 u
@.transpOrder := void;
* s8 h" \2 M7 P8 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: M6 L3 Z' s3 [4 V. i4 m
@,root.eventcontroller.simTime);
6 s8 R: z; C1 v @.HasOrder := false;+ _0 s2 j: t+ x0 B, S
@.DrivingHome := true;/ W7 y" o" D9 _2 p/ p7 h4 Z
rgManager.tryToStartTransOrder;1 K1 d7 K3 T& n N1 r. w0 t
if @.Destination = void
& b" Z5 v; V* Z" u, y& { then -- no transport order for vehicle @! `& u6 M) F" p
@.Destination :=* L, v( \: l; A1 }, v
rgManager.nearestFreeStation(@,track.~);
% [! o# I/ U. ~1 [# P; e newDirection(@); $ K& V; h) Z0 Z: a# z& [3 a# J2 D
if @.Destination /= void then7 a- s W( ]' B6 P: d4 q! g4 W6 v2 _
@.Destination.NumReservation :=
( N4 E5 R. R* H$ m1 w @.Destination.NumReservation + 1;( H2 K6 V& l) a3 _
end;
8 p! V9 L# T$ `! B @.CurrIcon := "drivingHome";
{1 g7 E9 y( d. u( l' D @.DrivingHome := true;
9 e( j! c' F$ n! x6 Z4 O* o end;( a, P# L2 F' J& e& P. Z4 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ u4 ~& c6 ]! Y( t% d# L' ?
part := @.transpOrder;
6 [- M5 Y" Z0 s; p1 W part.move(@);-- load part
# q; c& b* q5 D5 g @.CurrIcon := "load";8 f" P" i7 A, \; u' ]0 W" D
GlobalDistObj := part.globDestination;4 ^2 ^" ?0 k7 g* O5 u: u' e; c
assignLObj := rgmanager.rgAssignL;$ ~( A9 C3 H2 L7 r5 v S, |/ K2 d
row := assignLObj.getRowNo(GlobalDistObj);( Q$ x, L" ^2 O& M5 f$ Q4 D9 O
if Row = -1 then -- since 704 C: N0 p7 v2 x1 k1 T
if lan=1 then
2 i, l5 r9 m5 _$ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 i* O$ d! {3 }. F6 q$ V8 L) s0 J0 G( F
to_str("in der Andockstation: \"",?.~.name,"\""));
. M% p) {/ V, b0 G2 C else
7 c$ d3 {4 f/ I/ { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 Q! D/ D2 [; l e to_str("in docking station: \"",?.~.name,"\"")); $ f5 {: g# L' E
end;
: U N, V8 |* P+ A else8 F9 m$ n$ w+ V5 Y% |+ ~
@.Destination := assignLObj[1,row];+ J+ t5 u3 G3 h9 \/ f( N$ O8 v
end;
5 W, D) y: Q+ u A3 n( D0 \; X- ^2 I newDirection(@);( M! ?3 j: B% U# P0 s* a
@.HasOrder := true;- I1 `& h( ] _, f+ A1 r$ k' v0 g
end;1 o& x M4 W9 Y F# u& s( _( X
end;. z c0 b4 d m* V+ I2 e
end; -- of the method
1 E. O& k# i+ W' c |