/* called by: entrance ctrl of the object 'track'" r+ F1 _& z- Y/ A0 H0 \" b3 {- e
*/7 h: f7 x g: [1 n* Y
is2 l" W9 a r0 O9 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% E) ?6 d1 K+ ~7 v. Q' K( S
do
% q" z/ E$ {) c% Y+ E Lan := rootfolder.Internal.Tools.AOLlanguage;
! h# o& l# X, p8 `. p" l if current = @.Destination -- else return
8 M' }6 Z+ E) K4 v; M then
; ^0 @0 x% I9 \8 J( e* w @.Destination := void;' K# D& G, \' i( P; b# a" r9 O0 b5 s
if @.occupied then6 s9 }, d6 d/ y5 A
part := @.cont;
) {. f0 R, e# T @.transpOrder := void;. L) I8 \0 _8 X' t8 ^6 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) j3 d& n0 M4 \7 q
@,root.eventcontroller.simTime);
, i1 ^. C8 \3 L @.HasOrder := false;
* `6 n& t9 i2 P3 S @.DrivingHome := true;7 F: Y$ t% h* C8 S! m3 v
rgManager.tryToStartTransOrder;% u* N% ^" i# E$ |( l% c
if @.Destination = void
4 [ Y6 q/ \2 }# a3 `( z/ V4 w1 D then -- no transport order for vehicle @! O3 r; O- i# T8 C' h
@.Destination :=% J2 j1 y5 A8 N: ]
rgManager.nearestFreeStation(@,track.~);( P- X6 L& g! n9 v7 |
newDirection(@);
! [* B) m# P: q+ P3 ` if @.Destination /= void then
' ?6 V$ {+ u( J; U @.Destination.NumReservation :=
% H0 B, r/ Q4 l! B# F' V @.Destination.NumReservation + 1;
, o, F% X9 t& A% q! U" k0 i4 v) E# q end;2 ], M4 z: @8 j* y+ n! ]$ m
@.CurrIcon := "drivingHome";
1 a3 A5 L& a7 k& b @.DrivingHome := true;
8 U+ d/ h N) d7 v! o* O end;
9 Y# {7 K2 V1 v7 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ t" V! r/ W7 `; B& w
part := @.transpOrder;& w% |6 W/ ]0 O6 V1 p( k0 x: R
part.move(@);-- load part
) Q1 q# q4 N7 h3 Y @.CurrIcon := "load";. N! u5 A; n0 Q) v9 F4 ~' W
GlobalDistObj := part.globDestination; N2 ^, y1 w; m+ l! n0 Y1 O* `
assignLObj := rgmanager.rgAssignL;
& h4 q8 E, Y6 |/ x: c. M row := assignLObj.getRowNo(GlobalDistObj);
/ C3 o( P- U- Z' F3 w if Row = -1 then -- since 70, j4 G4 y( O) ?
if lan=1 then
5 R0 P, `/ w j/ U. ~; U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 Y2 L! A5 c. o( R0 p# M. v. j9 T
to_str("in der Andockstation: \"",?.~.name,"\""));
# v& s8 b, l1 h else& H5 E) c; T" a- ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! t) i j0 _7 B" s U
to_str("in docking station: \"",?.~.name,"\""));
# @: U/ n6 L" `$ J$ ^+ G& Q: ]1 ` end;) m" C5 ^ h4 ~; ~# y2 {( @
else4 U2 d5 _% @, u5 e/ n0 d# q$ q
@.Destination := assignLObj[1,row];) S& ^& v/ ]$ Q
end; 5 T* k$ X1 J! S6 q3 ]- F
newDirection(@);
9 z4 ?! S) d2 w c5 Q5 P @.HasOrder := true;
0 A" ?6 H! u F" O& {7 H end;
+ z) V$ G0 l/ V- l end;9 V/ K, [0 E3 e9 b0 G# z6 ^& P# F) L
end; -- of the method# Y+ s3 t5 J5 S! d
|