/* called by: entrance ctrl of the object 'track'
/ _$ G& o4 ~4 i*/2 v4 @/ m5 s- `8 U$ p
is; p8 m5 T4 i( l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 j+ O* H, ^ I( ?" i- kdo% |2 r) L. [- Q7 X
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 P' i; k! @/ o" E+ J if current = @.Destination -- else return
1 E( @& y% n4 ` W then$ m$ A1 n8 y T5 l
@.Destination := void;% I* A k6 C( k
if @.occupied then: n+ L; k& n3 J
part := @.cont;
3 s& K; i: T {) X6 L! M7 P @.transpOrder := void;
8 _8 G6 I% `; _& V8 d. p/ V, V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 _8 n; X) C# ?; Y" e+ }
@,root.eventcontroller.simTime);+ B1 f5 a3 _6 d* ]
@.HasOrder := false;2 U2 A0 Y$ n$ l& d W$ L* h
@.DrivingHome := true;
7 k; s& C# a" X% v) w l/ J rgManager.tryToStartTransOrder;
& g- ?; o- ^; G6 O* d if @.Destination = void
5 K: b0 K' h& w1 ^% W0 G4 y6 }; E# P5 { then -- no transport order for vehicle @& ]; I( q2 k* h& D/ y8 H8 f& q5 d
@.Destination :=
o$ ]5 i0 e0 {9 t, H2 y& \# H rgManager.nearestFreeStation(@,track.~);+ T8 v7 L' _5 E% Q# d/ c: o
newDirection(@);
& G) [ g$ K5 b if @.Destination /= void then! f0 z, N u$ h: Y2 Y
@.Destination.NumReservation :=( `/ X6 u! i" _/ v
@.Destination.NumReservation + 1;
* _3 n# Q5 V7 V; F2 U* L+ | end;
4 r/ k" w" _' ~ @9 |9 _ @.CurrIcon := "drivingHome";
4 g1 v0 x* G# o# ~5 D$ x f @.DrivingHome := true;% F& _! Q) s: Q# ], f ]
end;
0 ^7 g9 o" y5 `5 d! } else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ?/ [; a: W# X* b9 T
part := @.transpOrder;* A, C4 a: W7 D, P! d
part.move(@);-- load part# L" k- q1 t# J6 B
@.CurrIcon := "load";' G9 t: G# c( z6 \5 F
GlobalDistObj := part.globDestination;4 ~$ b5 c+ [7 P2 i3 J6 g7 |
assignLObj := rgmanager.rgAssignL;
3 X4 R% ^1 Z5 s" u9 N% R row := assignLObj.getRowNo(GlobalDistObj);
! I& T+ C2 b0 n' n) t if Row = -1 then -- since 706 c+ G/ }, R/ d" O n
if lan=1 then R/ f2 X% S. Z& p- o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 x% [ R- y: h( R- Y4 I. J to_str("in der Andockstation: \"",?.~.name,"\""));# M4 e5 u/ }! c4 ?- Q6 x' H
else
9 o+ _ o/ [( k; U2 S" C! R. d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ m& b) T7 ~2 @3 c3 y) {" K to_str("in docking station: \"",?.~.name,"\""));
# r5 D9 x2 q4 g% t( V+ U1 w end;
2 m& B- D4 T; b. `& W( Y$ E else
; G S& A- {3 U* e- [% R @.Destination := assignLObj[1,row];" [8 T* P5 O& W2 k/ b* ]
end; & t6 v9 u2 Y+ u* Q5 c$ G
newDirection(@);7 I* A2 k! K5 i Q7 v- [
@.HasOrder := true;' ]) [. M& ] d" u7 J- y f) {
end;
1 I- T* |/ W6 F1 B3 N) y7 G end;
# F- H- D& t* a# S8 b& Qend; -- of the method
8 W3 K3 R6 _& Y& @7 V |