Questions tagged [cvx]

CVX is a Matlab-based modeling system for convex optimization. CVX turns Matlab into a modeling language, allowing constraints and objectives to be specified using standard Matlab expression syntax.

CVX is a Matlab-based modeling system for convex optimization. CVX turns Matlab into a modeling language, allowing constraints and objectives to be specified using standard Matlab expression syntax.

99 questions
0
votes
0 answers

Solving the multiple-choice multidimensional knapsack

I am trying to solve some (relatively easy) instances of the multiple-choice multidimensional knapsack problem (where there are groups of items where only one item per group can be obtained and the weights of the items are multi-dimensional as well…
lstavr
  • 1
  • 1
0
votes
1 answer

How To Do Linearly Separable Binary Classification?

I want to solve following optimization problem - Cost Function: 1/2 ||W||^2 Subject to : Y_i(w.X_i - b) >= 1 Where X is a 700x3 matrix, Y is a vector stores the label of classes for those instances (valued as 1/-1) and w.X_i is the dot product…
Palash Kumar
  • 429
  • 6
  • 18
0
votes
1 answer

Replacement of symsum

What replacement can we use instead of symsum in a CVX code in Matlab? I want to use a double summation without using a loop, and symsum seems to be the only available option.
Amira Akra
  • 163
  • 11
0
votes
0 answers

Cannot install CVX

I try to install CVX in MATLAB but it still cannot complete. There are some error massages occurring during installation process. I have attached them already. Please see below UNEXPECTED ERROR: …
0
votes
0 answers

CVX - matlab - nonlinear constraints

In FMINCON, nonlinear constraints can be provided as a function argument (nonlcon). I tried to use a similar method in CVX cvx_begin variable x(n) minimize( somefunc(x)) subject to nonlcon(x) cvx_end But I get an error: Disciplined…
sprajagopal
  • 322
  • 1
  • 4
  • 20
0
votes
1 answer

How to write the constraints in CVX not using a loop

I'm using the matlab package "CVX" to solve an optimization problem. Currently I'm using a for loop to add the constraints, but I found that it is extremely slow when initializing the problem. for i=1:n norm(Nout(i,:)-Nin(i,:))<=tau; end Nout…
areslp
  • 383
  • 1
  • 4
  • 17
-1
votes
1 answer

How do I translate my matlab code to python cvx?

I need to translate my code from matlab cvx to python one , I would be happy if there is any help for me. ` eps = .1; A = [-1 +1 0 0 0 0 0 0 -1; +1 0 -1 0 0 0 0 -1 0; 0 +1 +1 -1 0 0 0 0 0; 0 0 0 +1 -1 -1 0 0 0; 0 0 0 …
omid74
  • 1
-1
votes
1 answer

CVXPY - passing both variables and constants

I'm trying to do the following (CVX matlab code): variable x(2) minimize(norm([x;1]) + 2*max([x;0]) But when I try to this in python CVXPY, I get an error: x = Variable(2) norm([x, 1]) TypeError: float() argument must be a string or a number,…
Maverick Meerkat
  • 5,737
  • 3
  • 47
  • 66
-3
votes
1 answer

Specify solver in CVXR

I am new to the package CVXR. I am using it to do the convex optimization within each iteration of EM algorithms. Everything is fine at first but after 38 iterations, I have an error: Error in valuesById(object, results_dict, sym_data, solver) :…
TDo
  • 686
  • 4
  • 9
  • 22
1 2 3 4 5 6
7