0
$\begingroup$

The max_wall_time and max_cpu_time are not working in ipopt (cyipopt).

See example:

nlp = cyipopt.Problem(n=len(x0), m=len(cl), problem_obj=HS071(),
                      lb=lb, ub=ub, cl=cl, cu=cu)

The following are not working:

nlp.add_option('max_wall_time', 20)

nlp.add_option('max_cpu_time', 20)

it says TypeError: Error while assigning an option.

Any idea about how to set these stopping criteria in ipopt (cyipopt)?

$\endgroup$

1 Answer 1

2
$\begingroup$

The solution is shown below. I just figured that out, so I thought it would be better to leave the question that might be helpful for others.

It accepts float rather than integer!

nlp.add_option('max_wall_time', 20.0)

nlp.add_option('max_cpu_time', 20.0)

$\endgroup$
1
  • 1
    $\begingroup$ The ipopt docs lists all available options including their type (float (real), integer or string). $\endgroup$
    – joni
    Commented Dec 18, 2022 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.