Skip to content

Commit

Permalink
Potential bug fix. This needs to be checked
Browse files Browse the repository at this point in the history
  • Loading branch information
light-weaver committed Sep 25, 2023
1 parent 7fc311f commit 048f0e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions desdeo_tools/interaction/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@


class RequestError(Exception):
"""Raised when an error related to the Request class is encountered.
"""
"""Raised when an error related to the Request class is encountered."""


class BaseRequest(FrozenClass):
Expand Down Expand Up @@ -385,7 +384,7 @@ def response(self, value: pd.DataFrame):


class PreferredSolutionPreference(BaseRequest):
"""Methods can use this class to ask the Decision maker to provide their preferences
"""Methods can use this class to ask the Decision maker to provide their preferences
in form of preferred solution(s).
"""

Expand Down
4 changes: 2 additions & 2 deletions desdeo_tools/solver/ScalarSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, scalarized_objective: Callable, problem, minlp_solver_path: s

def create_settings(self, max_evaluations=25, nlp_solver_path="ipopt"):
settings = rbfopt.RbfoptSettings(
#'/Users/seanjana/Desktop/Työt/project_codes/COIN_Bundle/coin.macos64.20211124/bonmin'
# '/Users/seanjana/Desktop/Työt/project_codes/COIN_Bundle/coin.macos64.20211124/bonmin'
max_evaluations=max_evaluations,
global_search_method="solver",
nlp_solver_path=nlp_solver_path,
Expand All @@ -153,7 +153,7 @@ def minimize(self, x0, **kwargs):
var_lower=self.lower_bounds,
var_upper=self.upper_bounds,
var_type=self.var_types,
obj_funct=lambda x, **kwargs: scalarized_objectives(x, **kwargs)[0],
obj_funct=lambda x, **kwargs: self.scalarized_objective(x, **kwargs)[0],
)

null_stream = open(os.devnull, "w")
Expand Down

0 comments on commit 048f0e6

Please sign in to comment.