Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model question #154

Closed
patwa67 opened this issue Apr 10, 2022 · 1 comment
Closed

Model question #154

patwa67 opened this issue Apr 10, 2022 · 1 comment

Comments

@patwa67
Copy link

patwa67 commented Apr 10, 2022

I just wonder if COSMO can handle a model of the form below:

#Toy data
A = [1.0000 0 0.5000 0.5000 0.4714 0.2357;
    0 1.0000 0.5000 0 0.2357 0.5893;
    0.5000 0 0.2500 1.0000 0.5893 0.2946;
    0.5000 0 0.2500 1.0000 0.5893 0.2946;
    0.4714 0.2357 0.5893 0.5893 1.0000 0.6111;
    0.2357 0.5893 0.5303 0.2946 0.6111 1.0000]

g = [0.5 -0.2 0.3 0.2 0.0 -0.1]
s = [1 0 1 1 0 0]
d = [0 1 0 0 1 1]
F = 0.3

#Model
max c'*g

constr c'*A*c/2 <= F
       c'*s = 0.5
       c'*d = 0.5
       c >= 0
@migarstka
Copy link
Member

migarstka commented Apr 12, 2022

Hi @patwa67,

If A in your model

#Model
max c'*g

constr c'*A*c/2 <= F
       c'*s = 0.5
       c'*d = 0.5
       c >= 0

is a positive semidefinite matrix then the problem is convex, and you can solve it with COSMO using a second-order-cone constraint.

However, the example matrix that you provided is non-symmetric (positive definiteness is defined for symmetric (or more generally Hermitian) matrices).

Useful references:

@patwa67 patwa67 closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants