/* called by: entrance ctrl of the object 'track'
) u% v1 U( P1 s+ Q# w+ n*/9 E8 Y/ O) Y1 a1 O* s( P
is
; p* J5 T4 @7 I; M* r" F4 I( I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: }9 U& }% z" ?+ d) Gdo
/ l3 x* W, A6 g6 u: N% z Lan := rootfolder.Internal.Tools.AOLlanguage;
' t' u4 F; E* G2 e if current = @.Destination -- else return' v2 K" j" \4 s u$ k& ]
then
+ i5 L) I I. ]* n" e9 } @.Destination := void;# x; o d1 L+ q0 `
if @.occupied then* ?% Q# j4 | J4 w/ r! F
part := @.cont;
: V2 G$ A W6 m2 n+ V$ W @.transpOrder := void;
) b0 I0 g* f+ @4 _2 e; m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 R0 N) ?; E: D" t @,root.eventcontroller.simTime);8 m+ S3 @6 Y0 M4 _% i- c% _
@.HasOrder := false;
c; b, P, ]* e- R6 K @.DrivingHome := true;
5 e+ \9 K; s* i u) p8 z! i rgManager.tryToStartTransOrder;% d& G; O! j6 }: L
if @.Destination = void/ Z# {8 h. l/ Z" F- a: F
then -- no transport order for vehicle @
, d+ H/ J& f& M& f' J @.Destination :=2 W6 \- z' ~8 d1 g
rgManager.nearestFreeStation(@,track.~);
$ ~: D* h% x' K8 J5 c q: |4 e newDirection(@);
' `' Q2 r& C3 j8 e* D3 ? if @.Destination /= void then
( N A" S t3 ^# [: l7 N @.Destination.NumReservation :=. `7 V( B+ H6 T& t$ W
@.Destination.NumReservation + 1;
2 V) d% E* `. U" j0 j$ | end;
- g+ |4 d4 ]+ P @.CurrIcon := "drivingHome";, ^7 _! l! l" d1 ^6 d3 S- Q. Q
@.DrivingHome := true;
- D: o. k( q) u' ^+ S9 J end;
/ J5 P) D3 I8 V, o else -- the vehicle @ is empty, both vehicle and part are in the same dock station. F6 Z7 T3 K% i# Z( |
part := @.transpOrder;$ e+ c2 o' H9 o3 D8 w- N) O+ S5 D
part.move(@);-- load part" Z! G6 I& H+ {1 h3 O- d7 n* k
@.CurrIcon := "load";
0 Q( m3 f ?; | GlobalDistObj := part.globDestination;
; n8 F% n, q7 c+ U assignLObj := rgmanager.rgAssignL;
~; C6 f; E0 x% B1 s( P row := assignLObj.getRowNo(GlobalDistObj);7 ^, i1 E4 z) N# P3 x' F8 s( {
if Row = -1 then -- since 70
+ r7 V! z( w1 T& g/ ~; C, u3 k if lan=1 then, x7 T% M' m; z- ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; @5 w! _+ q9 }" _7 e
to_str("in der Andockstation: \"",?.~.name,"\""));
/ y1 V0 y' D) t+ W else9 O' M# I* V5 z# k% R1 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" i5 q2 e4 w* |- Q) H; k8 Z& J to_str("in docking station: \"",?.~.name,"\""));
* W2 G2 d& K: v/ Y" f end;6 ]6 R" i) ?$ u) j) O' W. z' p# u
else, ?' d& _5 C& l: C
@.Destination := assignLObj[1,row];
8 A: J9 q7 L, c- O- N: ]9 O$ s" j end; + _1 ]& h* V8 u |0 V" H
newDirection(@);* j: ^" v, j" _( o$ |3 i+ f9 R% ^
@.HasOrder := true;$ q" k* H" P/ T: G
end;
' d; T& {7 x8 l3 A% e# h end;
4 f1 j, P6 j0 o$ p3 r" {$ ~" rend; -- of the method4 h8 c) F$ W/ B1 C6 B2 @
|