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

ignore_dcp option is not working as intended #55

Open
flodel opened this issue Sep 25, 2019 · 0 comments
Open

ignore_dcp option is not working as intended #55

flodel opened this issue Sep 25, 2019 · 0 comments

Comments

@flodel
Copy link

flodel commented Sep 25, 2019

When calling solve with ignore_dcp = TRUE , the DCP check is still run. I can spot where this is happening in https://github.com/cvxgrp/CVXR/blob/master/R/problem.R, near line 473:

  if(!is_dcp(object)) {
    if(ignore_dcp)
      print("Problem does not follow DCP rules. Solving a convex relaxation.")
    else
      stop("Problem does not follow DCP rules.")
  }

I would suggest replacing with

  if (!ignore_dcp) {
    if(!is_dcp(object)) {
      stop("Problem does not follow DCP rules.")
    }
  }
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

1 participant