/* called by: entrance ctrl of the object 'track'! B2 w* B: r0 ?( v
*/
" i7 L0 |# [6 {: [is
- \0 c3 l* i5 L) {8 G7 _9 o: ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;! \! n" r- Q2 Z
do: Y2 y5 a1 X& s" c5 g
Lan := rootfolder.Internal.Tools.AOLlanguage;& T) ?& t8 H3 P/ o1 @ c
if current = @.Destination -- else return P( k$ _* c$ C/ E
then$ O8 e- p5 G( S/ c" p7 D
@.Destination := void;
6 A7 r( |3 @! s" x z if @.occupied then; M+ J4 P% O7 _, U, E8 s, N/ i6 b
part := @.cont;
! t7 V8 j1 N g4 \% E. K8 m( I$ T3 D/ j" I @.transpOrder := void;6 o7 d b; P: L" l" g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 b3 c! G% U4 {. I2 b, ^& o+ f @,root.eventcontroller.simTime);% Z1 ?4 O! q n0 v7 D& A* r
@.HasOrder := false;0 S( `- X O' [2 C D8 K- f
@.DrivingHome := true;
" E3 x" z, h7 C rgManager.tryToStartTransOrder;
' T& T1 d% ]5 L7 u if @.Destination = void% T1 {: l( P* K+ W* g- k& X/ V
then -- no transport order for vehicle @
3 p. |! t( A4 {: z7 [ @.Destination :=4 [/ [( T; Q! @& M* f8 A
rgManager.nearestFreeStation(@,track.~);
8 N& e$ ^% b9 P$ g& h6 h- A$ D newDirection(@); & A6 r1 D; o1 E% f a% W( k
if @.Destination /= void then
2 [' N; Q. ~" v2 x @.Destination.NumReservation :=
4 g4 O8 R) {5 h/ D" e @.Destination.NumReservation + 1;
8 }9 {* ]; r3 N4 a end;5 K1 S* e7 ^, h6 o
@.CurrIcon := "drivingHome";& H1 _8 D& \( `
@.DrivingHome := true;2 b% ?- L1 b. q! _# z
end;
D+ Q8 K1 W: y3 f. t else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 {9 }7 E+ e" c J) }
part := @.transpOrder;/ v' ^& l* W0 U- ?4 o
part.move(@);-- load part
+ F7 D0 H7 A% p( U7 C& y1 `7 k @.CurrIcon := "load";
; x: S8 b" o# ` GlobalDistObj := part.globDestination;( O! U; R( \, l6 X, n
assignLObj := rgmanager.rgAssignL;: M2 p$ L; w2 h' V* r$ f3 k% k
row := assignLObj.getRowNo(GlobalDistObj);
5 I! W: V2 x9 v if Row = -1 then -- since 70! r" ?; T3 @- K) N* P5 `( B! u; s
if lan=1 then
" c$ `# J( @0 ]5 r9 b6 {* ]2 _! T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y; f: n( B3 x, z: a to_str("in der Andockstation: \"",?.~.name,"\""));* e# H4 Y# ]2 ^' P- b9 a+ l
else
5 Y7 K( H' I. Z7 V4 F3 I: g$ Y6 M% j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 d5 r' h5 T# f& l+ {" n% I to_str("in docking station: \"",?.~.name,"\"")); - s: Z, Q. t" |! a
end;
& E6 k/ u: ?! b else
o, }2 u( u6 g/ L* C" ~. ?$ d P @.Destination := assignLObj[1,row];
( y1 J1 I- }! W% n end; / Z0 T) q+ q8 v% C5 t% c+ j6 Y% g
newDirection(@);( w" U3 Z5 S9 ?( B; M
@.HasOrder := true; P) d8 W+ z' u. E1 z3 J( K
end;
2 f- |! D v' W# U end;. M# `; G. ~: T
end; -- of the method! S- Y/ @ l" J/ U0 g& m* ?3 }
|