We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Required for jump-dev/open-energy-modeling-benchmarks#17
The text was updated successfully, but these errors were encountered:
using HiGHS import MathOptInterface as MOI model = HiGHS.Optimizer() x = MOI.add_variables(model, 2) MOI.add_constraint.(model, x, MOI.GreaterThan(0.0)) ci = MOI.add_constraint(model, x[1] + 2.0 * x[2], MOI.LessThan(3.0)) function run_user_callback( callback_type::Cint, message::Ptr{Cchar}, p_data_out::Ptr{HiGHS.HighsCallbackDataOut}, p_data_in::Ptr{HiGHS.HighsCallbackDataIn}, user_callback_data::Ptr{Cvoid}, ) data_out = unsafe_load(p_data_out)::HiGHS.HighsCallbackDataOut # @show data_out if p_data_in != C_NULL data_in = unsafe_load(p_data_in)::HiGHS.HighsCallbackDataIn end print(unsafe_string(message)) return end callback_cfn = @cfunction( run_user_callback, Cvoid, ( Cint, Ptr{Cchar}, Ptr{HiGHS.HighsCallbackDataOut}, Ptr{HiGHS.HighsCallbackDataIn}, Ptr{Cvoid}, ), ) HiGHS.Highs_setCallback(model, callback_cfn, C_NULL) HiGHS.Highs_startCallback(model, HiGHS.kHighsCallbackLogging) MOI.optimize!(model)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Required for jump-dev/open-energy-modeling-benchmarks#17
The text was updated successfully, but these errors were encountered: