Skip to content

Commit

Permalink
Update ouu.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Aug 19, 2024
1 parent dfc51c9 commit b6ab0a1
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pyciemss/ouu/ouu.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,27 +181,16 @@ def __init__(
x0: List[float],
objfun: Callable,
constraints: Tuple[Dict[str, object], Dict[str, object], Dict[str, object]],
minimizer_kwargs: Dict = dict(
method="COBYLA",
tol=1e-5,
options={"disp": False, "maxiter": 10},
),
optimizer_algorithm: str = "basinhopping",
maxfeval: int = 100,
maxiter: int = 100,
u_bounds: np.ndarray = np.atleast_2d([[0], [1]]),
):
self.x0 = np.squeeze(np.array([x0]))
self.objfun = objfun
self.constraints = constraints
self.minimizer_kwargs = minimizer_kwargs.update(
{"constraints": self.constraints}
)
self.optimizer_algorithm = optimizer_algorithm
self.maxiter = maxiter
self.maxfeval = maxfeval
self.u_bounds = u_bounds
# self.kwargs = kwargs

def solve(self):
pbar = tqdm(total=self.maxfeval * (self.maxiter + 1))
Expand All @@ -225,8 +214,6 @@ def update_progress(xk):
},
)
take_step = RandomDisplacementBounds(self.u_bounds[0, :], self.u_bounds[1, :])
# result = basinhopping(self._vrate, u_init, stepsize=stepsize, T=1.5,
# niter=self.maxiter, minimizer_kwargs=minimizer_kwargs, take_step=take_step, interval=2)

result = basinhopping(
self.objfun,
Expand Down

0 comments on commit b6ab0a1

Please sign in to comment.