Skip to content

Dynamically changing parameter bounds #410

Closed Answered by blankjul
ThomasEwaldETH asked this question in Q&A
Discussion options

You must be logged in to vote

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).

import numpy as np

from pymoo.core.problem import Problem


class MyProblem(Problem):

    def _evaluate(self, x, out, *args, **kwargs):

        # write a function that >0 describes the amount of constraint violation
        # don't use a death constraint if not absolutely necessary
        G = eval_constraints(x)
        
        is_infeasible = np.any(G > 0)


        if is_infeasible:
            F = np.inf
        else:
           …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ThomasEwaldETH
Comment options

@blankjul
Comment options

@ThomasEwaldETH
Comment options

Answer selected by ThomasEwaldETH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants