/* called by: entrance ctrl of the object 'track'( T! q, {$ t' l5 |+ F0 a
*/' L9 q- T# f7 B5 u3 l; k$ k8 h
is
* f# {, o6 t) } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' N4 I1 l. t* \5 t3 A. s6 Sdo
$ b+ q, U0 b, E$ T( u0 u Lan := rootfolder.Internal.Tools.AOLlanguage;
; ~- E5 r* E4 z! W& F: x t if current = @.Destination -- else return
7 L% E, n+ S2 \; y/ X then. ]* A5 X0 X" e5 J) w4 b
@.Destination := void;
2 b# h7 R5 A% B/ W& r if @.occupied then' [7 z$ j6 R* ]9 K+ y- D. q% b2 X
part := @.cont;
' l: R% `# a% L5 U1 X @.transpOrder := void;
' y; t% {- }7 X6 Q/ ]5 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; G1 b) W Z' a& N+ Y @,root.eventcontroller.simTime);& I2 J# A. p4 s
@.HasOrder := false;5 k Q6 i) I0 K4 l6 b9 i9 k
@.DrivingHome := true;/ M# K" m1 S3 Y4 G3 @. F; Y9 J1 U1 z$ O
rgManager.tryToStartTransOrder;
: ]/ l$ f, p2 Y" C& D3 S6 |# U if @.Destination = void
/ {* b# x; P# P4 A then -- no transport order for vehicle @
6 l: o4 Q* r) M @.Destination :=- d. y5 q1 c# v3 t1 m
rgManager.nearestFreeStation(@,track.~);7 _7 S% p/ r4 S0 x; r% V* |
newDirection(@);
3 @. v9 o$ |2 U8 v% ^& I! P' R if @.Destination /= void then
3 _2 X/ D* ?& }- p- \# Z @.Destination.NumReservation :=( x! v9 y- W- t' V' i
@.Destination.NumReservation + 1;8 T: U3 H: y9 E$ z! ]2 f( Q
end;' r! y @. J$ o7 l8 j
@.CurrIcon := "drivingHome";
1 {) a, _' Y9 V$ M9 ^( W/ ]1 ~4 g @.DrivingHome := true;: b: J& _/ k$ g' w( L- F
end;( j$ L8 R' s& o3 e E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- ^. I. K, F" [6 T; d
part := @.transpOrder;
, o& w7 ^% A$ Z8 b# W0 o' h; Q part.move(@);-- load part: K( |, V5 A1 `& N% ~
@.CurrIcon := "load";4 b& B) |# m! A6 O7 E+ t0 ?4 i
GlobalDistObj := part.globDestination;* A0 z" q+ t' I/ g2 c% O' j
assignLObj := rgmanager.rgAssignL;/ f% e6 u/ F/ E: i
row := assignLObj.getRowNo(GlobalDistObj);
6 j* T; {- `. K/ v if Row = -1 then -- since 70
+ U5 e0 x* t2 i0 h if lan=1 then
# d ^6 T& |) ?* ]: o. k1 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' @0 T; Z6 y, f6 S6 i( L+ c
to_str("in der Andockstation: \"",?.~.name,"\""));. p5 \. u/ U* l1 ~6 t0 \0 o
else
. i: U& o+ z( T( w: U1 ]0 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 d& ?& S# U' D; z) k+ L+ R
to_str("in docking station: \"",?.~.name,"\""));
8 x' Z2 D k- x- i& Q. q; W end;
& [& Z/ S$ o8 F3 [- ~ else! X3 C2 O" Q: @( H% N6 F
@.Destination := assignLObj[1,row];
. W& n( X4 {* v" N X* L0 v7 Z ` end;
( L# \1 w0 e5 r newDirection(@);8 n. u* f$ e3 D. ~" x1 A
@.HasOrder := true;/ X; I, A0 P! U
end;, s! f* h. H: |7 R+ w3 w) v j
end;: m! n* H& E- Z0 h( \2 S3 Z* T
end; -- of the method; o) ]( s# p$ {* @5 I* w
|