Julia Wrapper API
Source: official HPR-QP-C documentation.
Setup
cd julia
make setup
Test:
make test
Direct demo commands:
julia --project=. examples/qabc_demo.jl
julia --project=. examples/jump_demo.jl
julia --project=. examples/solve_mps_demo.jl
Equivalent Makefile shortcuts:
make demo-qabc
make demo-jump
make demo-mps
Public API
Types
Model: opaque model handleParameters: solver parameter handleResult: solve result with copied Julia-owned arraysOptimizer: JuMP / MathOptInterface optimizer bridge
Model Construction
read_from_mps(path::AbstractString) -> Modelbuild_from_mps(path::AbstractString) -> ModelAlias ofread_from_mpsbuild_from_QAbc(Q, c, A, AL, AU, l, u; obj_constant=0.0) -> ModelBuilds a model from sparse or denseQandAplus vectorsc,AL,AU,l, andu
Parameters
Parameters(; kwargs...)
Keyword |
Setter |
Values |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Solve
optimize(model::Model, params::Parameters=Parameters()) -> Result
Field |
Meaning |
|---|---|
|
Integer solver status code |
|
Symbolic solver status |
|
Final iteration count |
|
Iteration when residual first reached |
|
Iteration when residual first reached |
|
Total solve time in seconds |
|
Time when residual first reached |
|
Time when residual first reached |
|
Final primal objective |
|
Final residual metric |
|
Final relative gap |
|
Primal variable vector |
|
Constraint dual vector |
|
Lower/upper bound dual helper vector |
|
Auxiliary dual vector |