/* called by: entrance ctrl of the object 'track'% E/ x7 v# e5 P1 E3 O
*/; g$ D7 C# g$ _7 x( Z) y0 R t& x
is
, {: S6 c; S2 N7 t8 g8 \& p* G; ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 O( A8 A% q! c+ ?do; |& ]3 ]# @9 q3 V9 U
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 n& X# {& H/ t if current = @.Destination -- else return
* c" I3 q$ j5 g: i, F then/ N; i# z/ D" q
@.Destination := void;, w: c3 D8 ]/ A# @& F
if @.occupied then
) i2 G I$ T, o/ o" W3 n part := @.cont;
* g, j; v; _ i: V3 Q' X @.transpOrder := void;
) m4 A( ]6 s3 o9 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 _. k/ X6 Q4 [( ^1 o4 q5 K( b
@,root.eventcontroller.simTime);
0 g$ g, a& X% Q# [* a @.HasOrder := false;& S" {% S8 N$ }6 m5 p6 H# e
@.DrivingHome := true;/ E) U Q3 y5 |
rgManager.tryToStartTransOrder;
2 f3 g: I7 A H5 }$ o- E; T& } if @.Destination = void2 c3 F( K3 s2 J% D5 I2 i; p
then -- no transport order for vehicle @4 E- K p% ]5 [
@.Destination :=: C7 c8 ?( O' m
rgManager.nearestFreeStation(@,track.~);9 ?; P4 E5 d# q/ D- z) W/ z6 }
newDirection(@);
; Z: B2 F. X, H1 s# `& S3 }( o if @.Destination /= void then7 c1 @. A5 `: X) }6 Z% A3 H
@.Destination.NumReservation :=
$ O, {$ t& u! e) I: c& K @.Destination.NumReservation + 1;
' z& S, L# R; m4 K8 z }+ F$ Z end;% Z& ?* H8 w f( S" ~- O
@.CurrIcon := "drivingHome";5 a# n% h* A7 @! W2 Y. M
@.DrivingHome := true;
* }1 @4 b5 O! T3 c! j, h- M2 S end;
6 w5 `+ p: e; n' {$ F$ ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) }# D/ J2 |% S% U; ~) L0 h part := @.transpOrder;3 ^$ [4 x$ M8 N! h! k
part.move(@);-- load part$ l- D7 }" g2 U& B% L. h! l
@.CurrIcon := "load";: e; Q: N1 s- ~9 @4 }
GlobalDistObj := part.globDestination;
2 _: o |8 r9 u$ v D k assignLObj := rgmanager.rgAssignL;
, A4 p, ~6 e5 I2 f2 h row := assignLObj.getRowNo(GlobalDistObj);( X. X4 M5 x! V) [5 |2 @" I' O9 r
if Row = -1 then -- since 70
9 G5 q* n+ E) `# i if lan=1 then' U) Q* K3 `4 z8 V) ]7 g: `: s5 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% U7 c8 G# V% q0 v
to_str("in der Andockstation: \"",?.~.name,"\""));. v: D- ~# N! e% L. c+ T2 H& y5 g" S
else, G% J5 z) C; F% B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 v+ V, O* L; T t* ~
to_str("in docking station: \"",?.~.name,"\"")); h. U9 U- w, D$ G
end;2 L2 @% L. O# g% V4 x& T. ]
else6 w+ g1 ~* P& ?( z$ X5 |
@.Destination := assignLObj[1,row];
- p7 d1 A8 }/ O end; & T$ x5 I2 J% M+ W Z% X
newDirection(@);; f9 h; w8 @" M1 W/ g
@.HasOrder := true;
! Z: T% Z2 C5 L0 e7 _% i. P) N7 W end;
4 q5 r; i' I2 w9 f1 E3 H end;
1 t, ^: K0 _8 G& Aend; -- of the method+ u% e6 I" H( n# r' J* B% p& ]
|