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

Status msg: Unknown Status #259

Open
goldenhazard opened this issue Aug 21, 2024 · 5 comments · May be fixed by #261
Open

Status msg: Unknown Status #259

goldenhazard opened this issue Aug 21, 2024 · 5 comments · May be fixed by #261
Labels

Comments

@goldenhazard
Copy link

Hello, I am using the cyipopt v1.4.1 a lot for my project.

During a project, I frequently face the status msg with the b"Unknown status". From my observation, it occurs a lot when the constraint becomes tight, but a feasible solution still exists (Cons < 0).

Could you please advise how to find the cause of this problem (or if a similar issue has been observed, which I cannot find in the issue history.)

Below, I provide how I construct the NLP problem using cyipopt

    nlp = cyipopt.Problem(
        n = n_optvar,
        m = n_constraint,
        problem_obj = problem,
        lb = [-1] * n_optvar,
        ub = [1] * n_optvar,
        cl = [-1e20] * n_constraint,
        cu = [-1e-6] * n_constraint
    )

    nlp.add_option('sb', 'yes')
    nlp.add_option('print_level', 0)
    nlp.add_option('tol', 1e-3)
    nlp.add_option('max_wall_time', self.nlp_time_limit)
    
    k_opt, info = nlp.solve(k_0.cpu().numpy())
@moorepants
Copy link
Collaborator

moorepants commented Aug 26, 2024

"Unknown status" is returned if cyipopt does not have a specific status message for what IPOPT returns. It is possible that we don't have all status messages implemented for newer IPOPT versions.

@moorepants
Copy link
Collaborator

moorepants commented Aug 26, 2024

We have 19 status messages here: https://github.com/mechmotum/cyipopt/blob/master/cyipopt/cython/ipopt_wrapper.pyx#L85

which should match those here: https://coin-or.github.io/Ipopt/OUTPUT.html

but there is a mismatch:

Maximum_WallTime_Exceeded present in IPOPT, not in cyipopt

Invalid_Number_Detected present in cyipopt, not in IPOPT

@goldenhazard
Copy link
Author

goldenhazard commented Aug 31, 2024

Thanks! it was Maximum_Walltime_exceeded problem.

For future reference, downgrading ipopt version helped not spitting this message.

@moorepants moorepants added the bug label Sep 1, 2024
@moorepants
Copy link
Collaborator

We need to update the status messages here to match those available in IPOPT. Thanks for reporting.

@moorepants
Copy link
Collaborator

See: https://coin-or.github.io/Ipopt/IpReturnCodes__inc_8h.html#ab542e0b1ca364a9b7525a876ffdae7d7

Maximum_Walltime_exceeded was added in IPOPT 3.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants