Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluating expensive blackbox constraints? #19

Open
the-alleged-car opened this issue Mar 12, 2018 · 1 comment
Open

Evaluating expensive blackbox constraints? #19

the-alleged-car opened this issue Mar 12, 2018 · 1 comment

Comments

@the-alleged-car
Copy link

the-alleged-car commented Mar 12, 2018

Hi,

Is it possible to use pySOT with expensive blackbox constraints?

For example, if the objfunction() method in the optimisation problem class can be written to use an external piece of simulation software, then how might this be applied for the eval_ineq_constraints() method?

In my case, I would be interpreting simulation results from an external program to provide objective function values and constraint function values to pySOT. But the eval_ineq_constraints() method seems to accept a numpy array for a number of different points all at once, unlike the objfunction() method which accepts one point at a time to be evaluated (if I understand the ReadTheDocs documentation properly). Also, it seems to me that it is possible that objfunction() and eval_ineq_constraints() are not necessarily called as a pair - objfunction(x) could be called multiple times for different x before a single call to eval_ineq_constraints() might be performed which evaluates the constraint functions for multiple points during that single call to eval_ineq_constraints().

I think it is possible for a user to write their objfunction() and eval_ineq_constraints() in a clever way to be able to make efficient use of each call to the external simulation program, e.g. storing both objective and constraint function values from an external simulation run for a point even, if invoked by only one of objfunction() or eval_ineq_constraints(); hence the stored values can be checked by future objfunction() or eval_ineq_constraints() calls later in the optimisation to avoid repeating external simulations if we already have the information stored by an earlier call.

In addition, I have another related question: if there are to be 500 objective function evaluations in an optimisation, then there would also be 500 evaluations for each constraint, where the objective and constraint functions are evaluated on the exact same set of points? I am not familiar enough with either optimisation in general or pySOT in particular to know for sure.

Many thanks.

@dme65 dme65 self-assigned this Mar 12, 2018
@dme65 dme65 removed their assignment Dec 7, 2018
@dme65
Copy link
Owner

dme65 commented Dec 7, 2018

There is currently no support for computationally expensive constraints, and as you saw in my previous reply, all constraint handling was removed in 0.2.0. There is clearly support from POAP to pass the values from computationally expensive constraints back to the strategy, but we have no strategy that can handle this.

The standard approach to computationally expensive black-box constraints is to use surrogate models to approximate the constraints. Such a strategy will fit well with the new framework, but I'll need help with the implementation since I just graduated.

We definitely need support for analytical and black-box constraint handling.

@dme65 dme65 closed this as completed Dec 7, 2018
@dme65 dme65 reopened this Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants