Dynamically changing parameter bounds #410
-
Hello there, while using the global optimization module I realized, that I have a problematic phenomenon in my optimization problem, that I cannot solve on my own. I will describe it with a simple example: My optimization has, say, five parameters (a, b, c, d, e), that have lower and upper bounds, which I know up front. Those five parameters determine the area of one large rectangle (a x b), the area of a number of smaller rectangles (c x d), and finally the number of small rectangles (e). I have a strict constraint, that all small rectangles must fit into the large one. If not, the solution is invalid, no matter of the objective function's return value. Problematic is the fact, that I must expect the objective function to return invalid values for the optimizer then (e.g., NaN), maybe also just errors that are raised. Regarding the optimization, I cannot tell if, or when this will happen. I can only check this with every run inside the _evaluate method. In addition, my objective function is quite computationally intensive. Checking the constraints on the other hand is not. To make things worse, I create a plot of the Pareto front during the optimization using the Callback class. This means I don't like to have any NaNs or infs, or very large numbers in my generation evaluations, that would otherwise corrupt the plot. My basic understanding is that this is a typical inequality constraint, that I have to provide for the algorithm class. However, I wonder when the constraints are checked in the algorithm, and what the algorithm does with the corresponding objective function's values when finding that a constraint is violated. In addition, I was wondering if there is an alternative option to proceed in the _evaluate method after a failed constraint check of this kind. My main goals here are I hope I made my problem clear. If not, I am prepared to elaborate further. Best regards and thanks a lot in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Thomas, interestingly problem you are working on! I would create constraints that provide the amount of infeasibility because this will help a lot during convergence.
During plotting you can give infeasible solutions some extra treatment, as they have no objective values to plot. Honestly, I think you can only achieve one or the other. Either you save time not evaluating F which means you don't have valid numbers or otherwise always evaluate but lose some time. |
Beta Was this translation helpful? Give feedback.
Hi Thomas,
interestingly problem you are working on!
I would create constraints that provide the amount of infeasibility because this will help a lot during convergence.
Also, I would not calculate F, whenever G is violated (especially if F is expensive).