Takumi
Takumi

Reputation: 11

How can I write the code for optimization problem with adding new constraints that use all optimal solutions in each iteration?

I currently deals with optimization problems with a convex constraint function by cvx. I consider approximating the function by point-wise maximum function composed of the tangent lines that can be obtained at optimal solutions in each iteration. However, I am not sure how I can use the previous information and add the constraint in each iteration.

I tried to preserve the previous information, such as optimal solutions. For example,

X = [];
cvx_begin 
    variable opt_x(n,1)
    
    minimize ( 'objective function' )
    subject to
          'constraints'
    X = [X, opt_x];
cvx_end

However, X contains only last optimal solutions, and doesn't contain the optimal solutions in each iteration.

Upvotes: 1

Views: 31

Answers (0)

Related Questions