fmincon satisfying constraints

Hello, So i have a problem where i am trying to optimize a channel (looks kind of like a sin wave) that runs through a plate. The design parameters are x and y locations of various points along the channel edge.
Running fmincon, i have a set of nonlinear constraints that define the x and y locations so that the two edges of the channel cannot overlap or cause the channel to get too thin. If they overlap, the model cannot be generated and the whole thing fails.
I am trying to set it up, so that my bounds allow for a variety of shapes for the channel to be in, while my constraints ensure that the channel does not cross itself or get too thin. However when running fmincon, during intermediate steps it will allow the design variables to go outside the constraints (while staying in the bounds).
Is there a way that i can get it to satisfy the bounds and the constraints during intermediate steps?
Thanks,

답변 (2개)

Sean de Wolski
Sean de Wolski 2012년 3월 23일

0 개 추천

You say that there are intermediate steps that violate the bounds. But does the solution lie with in them? If so, I would hazard a guess that this is expected behavior.

댓글 수: 1

Ben
Ben 2012년 3월 23일
The solution cannot finish, because as it changes the design variables during the steps between optimization iterations, one of the variables goes outside of the constraints (but stays within the bounds) and thus crashes.
I need it to stay within the constraints and bounds at all times, is there a way to do this?

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

Matt Kindig
Matt Kindig 2012년 3월 23일

0 개 추천

I've had this problem before with fmincon. Unfortunately, I could not figure out a way to force MATLAB to ensure that the intermediate iterations satisfy the constraints. I ended up calling the constraint function within my objective function, and testing whether the constraints were satisfied (to within some acceptable tolerance). If the constraints failed, I had the objective function return some really large value (to prevent fmincon from converging to this solution).

질문:

Ben
2012년 3월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by