/* called by: entrance ctrl of the object 'track'
$ J+ N( z/ P* g- p*/
& k' m9 _6 B' Z2 e! l6 K/ Iis8 v o# z% D) ^' z& }6 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* w$ X0 F h6 D/ M# bdo5 |* p! m% C) ?4 `/ W/ w( p+ U- j4 U% l
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 l3 F, f6 d& g, Q1 P if current = @.Destination -- else return
+ h- x/ [/ E3 Z3 M W) I then
' X. E6 }7 S( ?* s @.Destination := void;$ ?% M5 k* M8 ~: Y+ V
if @.occupied then
* Q7 U, i8 Y. S7 V part := @.cont;# D G0 v+ _; \( |4 A4 _6 i, a
@.transpOrder := void;. X) S: |! y- u* Z- S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 @% u& t8 _4 E/ C2 _, j* { @,root.eventcontroller.simTime);
+ L7 R% c+ j$ \! C9 [ @.HasOrder := false;
8 H$ _5 ]& ]2 B% N4 `( V @.DrivingHome := true;
, G' ~6 C. L P. c( o rgManager.tryToStartTransOrder;# J+ ^- _3 [% o* K* o( i3 g" m
if @.Destination = void
6 j$ N; `; h. k! h |% M5 ^ then -- no transport order for vehicle @' o. S% }$ v/ I) m
@.Destination :=5 `9 ?( s3 m \) q( L. m9 [
rgManager.nearestFreeStation(@,track.~);- B* N" E5 |& [1 D. ^8 n2 j: Q
newDirection(@); 4 q e1 l" i2 N8 ^. i, X. L
if @.Destination /= void then
5 b& P+ O) |2 c' ?* ` @.Destination.NumReservation :=- v, _: g3 _; ]* w
@.Destination.NumReservation + 1;' j$ D% ]) u9 a# m! U7 T% O
end;
5 [- y0 }$ @ U- q& ~ @.CurrIcon := "drivingHome";
7 p1 g+ q- i6 _3 }4 }/ G: | @.DrivingHome := true;! _& R x& p4 E v, b# }2 x
end;
. @( y# E3 l/ ~- b else -- the vehicle @ is empty, both vehicle and part are in the same dock station; Y; M6 w2 r0 d6 h& D
part := @.transpOrder;
. h* }5 `9 Q: r* l part.move(@);-- load part
0 N6 q& _$ m( E$ ] C8 K9 ^ @.CurrIcon := "load";, s% d: \5 Y4 e7 ]) i' K) Q" m
GlobalDistObj := part.globDestination;/ ]" I! J* ?' `* c
assignLObj := rgmanager.rgAssignL;
% T. [" `9 f7 a9 V3 i! I row := assignLObj.getRowNo(GlobalDistObj);
) O! _$ W a: ?* I. _, D if Row = -1 then -- since 70' P& \6 C4 V' A. r0 y1 H
if lan=1 then2 W3 E6 j# Y3 w. r) Z1 {: s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ i: W3 a+ a7 W to_str("in der Andockstation: \"",?.~.name,"\""));0 |3 r j' C4 t$ k- H& w4 u
else
6 c& ~' _" f0 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 F6 ~0 N4 | Q/ w6 e to_str("in docking station: \"",?.~.name,"\"")); 4 S6 Z, k$ `5 `3 }1 }' B+ \
end;+ v0 I2 [3 c k
else
Q# X0 @1 P; i) B& E; ], ]0 \* k @.Destination := assignLObj[1,row];
0 U& I; @ L3 R3 U* {1 K( @ end; # N( w: ]( s2 ^3 f" O" A$ m8 F
newDirection(@);
9 {/ }) |% F3 t# q0 \ @.HasOrder := true;
/ |% u& H& g! q1 w1 g* z' L! j end;
r w8 R2 n3 l( `" z9 J# } end;, f9 e7 w ]7 ^9 W- j2 z# Z" |
end; -- of the method
7 l3 F* d( l+ ~; y5 p. t! d |