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

remove_constraints!(opt) doesn't work; chkn() not defined #133

Closed
gwhammett opened this issue Jun 25, 2019 · 0 comments
Closed

remove_constraints!(opt) doesn't work; chkn() not defined #133

gwhammett opened this issue Jun 25, 2019 · 0 comments

Comments

@gwhammett
Copy link

I'm finding NLopt.jl very useful, but when I try using the remove_constraints!(opt) function, it doesn't work. Running the first example (using the standard interface, not the JuMP interface) in the README.md file (at https://github.com/JuliaOpt/NLopt.jl) works just fine, but if I follow it with the command:
remove_constraints!(opt)
it gives the error message

UndefVarError: chkn not defined

Stacktrace:
 [1] remove_constraints!(::Opt) at /Users/myname/.julia/packages/NLopt/eqN9a/src/NLopt.jl:457
 [2] top-level scope at In[13]:1

The offending line in function remove_constraints!(o::Opt) is:

chkn(ccall((:nlopt_remove_inequality_constraints,libnlopt),
               Result, (_Opt,), o))

It appears that the chkn() function is not defined. I'm not an expert at Julia and am not sure how to fix this. Is there another module where it is defined that I should also be using?

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

No branches or pull requests

1 participant