PSOPT / psopt

PSOPT Optimal Control Software
GNU Lesser General Public License v2.1
193 stars 75 forks source link

NLP Solver reports problem failed but solution.error_flag is not set. #55

Closed TimKrause2 closed 1 week ago

TimKrause2 commented 2 weeks ago

The output from psopt shows: NLP solver reports: *** The problem FAILED! - see screen output but solution.error_flag is not set. Is this a bug or is there a better way to determine if the NLP solver fails?

TimKrause2 commented 1 week ago

I looked at the code for psopt and found that there is a way to determine if the NLP solver succeeded. Just inspect solution.nlp_return_code. For example, like this:

if(solution.error_flag || solution.nlp_return_code!=Solve_Succeeded)
        return false;