/* called by: entrance ctrl of the object 'track'
' f+ E: f) v. b! w2 I! w*/" B2 l7 L, e2 h( A+ @
is2 V& |0 g& Z1 ?6 a/ k7 c) f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 m( p# \( e8 j4 |, [
do: q9 g- R1 K" Q7 w7 E
Lan := rootfolder.Internal.Tools.AOLlanguage;# e/ w. S# W$ Z
if current = @.Destination -- else return
3 R" A4 ]' t7 X. S+ C2 i2 S8 h) G& M then; ?! M2 c5 `, c# T; h
@.Destination := void;
3 D- M3 v- x: p if @.occupied then1 d! j$ z+ W5 O5 P& e" n
part := @.cont;
3 h: D" p1 F, _! O. {) @ @.transpOrder := void;% c) i- N- z6 ~) |: a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- Q$ w4 L" }7 g9 J' L% m2 h
@,root.eventcontroller.simTime);5 f4 v( E+ [# k
@.HasOrder := false;
- e7 l, x( r+ j. k, o @.DrivingHome := true;
! h, u( U) e! G! X* c( o rgManager.tryToStartTransOrder;5 e; u0 `9 X+ E$ b9 O7 {+ Y2 T7 E
if @.Destination = void
; J% a' ^9 z: N. p8 e( X0 H/ q! f then -- no transport order for vehicle @
3 q/ Z" a/ d+ x. Z @.Destination :=
6 Y) V P) X2 f, s. B! l5 X rgManager.nearestFreeStation(@,track.~);
7 a' K# c C3 M% O; n newDirection(@);
: }. B# u& O% A5 ?$ O if @.Destination /= void then( x2 C" e, q4 M9 m7 i& y4 Y% [3 O
@.Destination.NumReservation :=9 c* G \% _$ w9 s2 P. i
@.Destination.NumReservation + 1;6 e) N8 v1 h- B0 ^' P# R
end;
. A& I: D- B1 T' e) R @.CurrIcon := "drivingHome";+ Y: C2 Q6 Z8 E! o/ [4 y' L
@.DrivingHome := true;' j; \: Q, X6 ~, [, T; c
end;
* J1 y8 ?6 d1 V9 C0 F9 h* l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ Y/ O: q. P* S part := @.transpOrder;0 V: H) U" e! ?0 Z- \
part.move(@);-- load part0 x* p1 W' I3 V8 W/ `" `
@.CurrIcon := "load";
4 K3 y% E9 ~7 H GlobalDistObj := part.globDestination;. g$ y8 z( W; ?7 J6 n2 O% S. x
assignLObj := rgmanager.rgAssignL;
2 ^9 A8 w9 F6 b3 U3 n+ }4 F row := assignLObj.getRowNo(GlobalDistObj);
; m5 @9 e; S3 j1 b if Row = -1 then -- since 70
: @) u% q- O! }& c. _ if lan=1 then
- b3 b! \9 G! l S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ z- M6 P* q! k to_str("in der Andockstation: \"",?.~.name,"\""));4 B* f; q! w/ A) v
else
+ O5 w8 _+ O8 Y `4 S' ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 r: v; j- L# Q n* E to_str("in docking station: \"",?.~.name,"\""));
& y% J( a. n& m end;# k$ J3 s0 b8 X- |
else
1 ~6 t O( j; r5 i* R @.Destination := assignLObj[1,row];
" ~1 c2 A' h. V/ i6 N7 h: I end;
* D3 Z9 ]: R/ t: k newDirection(@);
9 H! t# y& w4 ~1 D: m @.HasOrder := true;0 E4 x) Y0 T9 j1 M
end;( y- d7 E; C! V) [; d/ D; |
end;9 G9 R7 J$ T5 N- J2 M
end; -- of the method
9 U$ D9 \9 r7 a+ G |