필터 지우기
필터 지우기

nonlinear optimization constraints problem

조회 수: 1 (최근 30일)
Zhang Zhang
Zhang Zhang 2020년 3월 24일
댓글: Zhang Zhang 2020년 5월 13일
I've a optimization problem which has 2 design variables x1 and x2. There are 2 nonlinear constraints g1(x1,x2) and g2(x1,x2). g1 defines the nonlinear relationship between x1 and x2 such as x1^2 <= x2^2 - 1 and g2 can be determined after a simulation outside matlab. I chose sqp algorithm to solve the problem and the question is that sqp will calculate gradient of g2 even if g1 is violated(e.t. x1 = 1,x2 =1 ) and error will occur in g2 because of the design varibales will generate a wrong shape in simulation which can not be used. Correct shape can only be generated when g1 is satisfied. The biggest problem is that g1 can not be reformed to a linear constraint as an upper bound and a lower bound.What should I do?

답변 (1개)

Alan Weiss
Alan Weiss 2020년 3월 24일
I suggest that you ensure that your initial point is feasible, and then insert code into your objective function that first evaluates the constraint, and, if not satisfied, returns NaN for the objective function value without any further calculation (I mean without calling the simulation).
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
Zhang Zhang
Zhang Zhang 2020년 5월 13일
Sry to reply late. That worked well with my code, thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by