Skip to content

Commit

Permalink
Correcting bound for boundary constraint in layout opt.; removing har…
Browse files Browse the repository at this point in the history
…d-coded rotor diameter value (#367)
  • Loading branch information
bayc committed Mar 4, 2022
1 parent 9663a62 commit c719360
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions floris/tools/optimization/pyoptsparse/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def add_var_group(self, optProb):
return optProb

def add_con_group(self, optProb):
optProb.addConGroup("boundary_con", self.nturbs, lower=0.0)
optProb.addConGroup("boundary_con", self.nturbs, upper=0.0)
optProb.addConGroup("spacing_con", 1, upper=0.0)

return optProb
Expand Down Expand Up @@ -205,5 +205,4 @@ def nturbs(self):

@property
def rotor_diameter(self):
# return self.fi.floris.farm.turbine_map.turbines[0].rotor_diameter
return 126.0
return self.fi.floris.farm.rotor_diameters[0][0][0]

0 comments on commit c719360

Please sign in to comment.