befelix / SafeOpt

Safe Bayesian Optimization
MIT License
140 stars 50 forks source link

upper bound constraints #3

Closed wang90063 closed 4 years ago

wang90063 commented 4 years ago

Hi. I wonder whether it is possible to add the upper bound constraints, i.e., gps<=fmax, which are opposite to the lower bound constraints, i.e., gps>=fmin. It seems to be possible to add the upper bound constraints to the "comput_safe_set" functioon when lipschitz constant L is infinite.

pengz1234 commented 4 years ago

Hi. I wonder whether it is possible to add the upper bound constraints, i.e., gps<=fmax, which are opposite to the lower bound constraints, i.e., gps>=fmin. It seems to be possible to add the upper bound constraints to the "comput_safe_set" functioon when lipschitz constant L is infinite.

您好,您这个问题解决了吗?

befelix commented 4 years ago

Sorry for the late reply - sure, there's nothing that stops you from doing that. However, it's easy to already do this in the current format. Rather than a constraint f(x) <= fmax you can simply model -f(x) with a GP instead and have a constraint -f(x) >= -fmax.