/* called by: entrance ctrl of the object 'track'
3 V0 `7 ~( M3 b8 J: I% a*/
7 w3 b) O) A- F1 R1 A7 n+ u; \# J dis
9 w$ N# b( ?1 T3 a+ @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! }! ]$ @( B8 ^+ J% f9 {do
6 {9 W; E6 |2 P: F- V Lan := rootfolder.Internal.Tools.AOLlanguage;/ C& {- M3 o6 n0 i. o0 v3 R4 E# Q
if current = @.Destination -- else return! Q5 h% X( |" d- |/ W* a3 Z
then/ H6 o" f* M/ F. v9 j' P& ]7 Q$ `
@.Destination := void;
& N4 s+ E+ w" `# n if @.occupied then
' V! u. `. _, w- E. | part := @.cont;' _4 A+ N6 y/ A
@.transpOrder := void;* A+ _3 \- q6 r2 D8 c! l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 J9 L8 ~) L J7 P; A
@,root.eventcontroller.simTime);
) G& m3 i' S# G5 \6 ]# a" q% } @.HasOrder := false;
7 b6 E; ^" z Z @.DrivingHome := true; J$ e! k+ O F N. P( [2 H
rgManager.tryToStartTransOrder;
o g1 `1 D& Z% A if @.Destination = void
# v j/ d+ K. B, B/ l( @1 w then -- no transport order for vehicle @
& t8 a% U8 W& p* R( c. s4 z @.Destination :=
. B) W% K& L L7 D7 ~ rgManager.nearestFreeStation(@,track.~);, y2 x8 D* _* o g1 ?3 e
newDirection(@); . f7 R R2 Q h6 s3 C. W" I+ c
if @.Destination /= void then+ M( r1 K- P4 _
@.Destination.NumReservation :=
; v+ M5 p' ~' b! Y @.Destination.NumReservation + 1;% W3 G u2 [. t* `; l8 ]% O
end;
/ Y4 b# W. J7 n) b @.CurrIcon := "drivingHome";) P+ v$ [9 P: L' u% t+ P
@.DrivingHome := true;
0 K, c; r2 P3 O end;! c ?1 U& g9 n# M4 p2 w% l5 K- @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 s/ S$ u. C$ ]; u+ t- B0 q" A part := @.transpOrder;5 G- O7 @' J" _ i
part.move(@);-- load part
, \/ @4 [9 t5 b/ S @.CurrIcon := "load";2 o! D$ l+ c/ e1 ]5 f8 T2 E8 [
GlobalDistObj := part.globDestination;
& K3 p) _! t" z' R) F, M assignLObj := rgmanager.rgAssignL;
- C# }0 i! l7 P% H- v row := assignLObj.getRowNo(GlobalDistObj);9 D! i' ^6 {/ {) u* z9 s
if Row = -1 then -- since 70) Y8 _) v, i( P
if lan=1 then# V; N" R& W- i( t3 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& ]3 @. m/ D! c7 Q
to_str("in der Andockstation: \"",?.~.name,"\""));6 F/ u- S: I) y. z$ K
else2 T I; w) n! \, ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& q3 F* {( F+ h/ m8 } to_str("in docking station: \"",?.~.name,"\"")); , W: p" l; S- x$ E% y" I
end;
9 \( ^) L6 H7 t2 `: x) U else1 C& Z* C3 ?" W% m8 O3 D ^
@.Destination := assignLObj[1,row];
" e/ B/ O$ s- c5 k9 c9 Q9 I end; 0 s9 L* |- K8 R1 }$ ~; r) H
newDirection(@);
; r; {& E6 t ^5 t @.HasOrder := true; B, ?5 x" H) ]; z6 ^3 |
end;
! y5 m+ B$ e' \ end;
. C+ k3 X D" z) U9 }0 T, {+ ]) fend; -- of the method
! n- V7 v5 a5 M8 b8 M% S: e |