From c02e0cd60fb916d4a5210faa919106a28216d7be Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 4 Dec 2023 20:04:26 +0000 Subject: [PATCH] build based on 69974da --- dev/index.html | 2 +- dev/reference/index.html | 6 +++--- dev/search/index.html | 2 +- dev/tutorial/index.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/index.html b/dev/index.html index 49d5620..ec1a770 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · QuadraticModels.jl

QuadraticModels.jl

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

+Home · QuadraticModels.jl

QuadraticModels.jl

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 4548842..c2960a2 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,8 +1,8 @@ -Reference · QuadraticModels.jl

Reference

Contents

Index

QuadraticModels.QuadraticModelType
qp = QuadraticModel(c, Hrows, Hcols, Hvals; Arows = Arows, Acols = Acols, Avals = Avals, 
+Reference · QuadraticModels.jl

Reference

Contents

Index

QuadraticModels.QuadraticModelType
qp = QuadraticModel(c, Hrows, Hcols, Hvals; Arows = Arows, Acols = Acols, Avals = Avals, 
                     lcon = lcon, ucon = ucon, lvar = lvar, uvar = uvar, sortcols = false)
 
 qp = QuadraticModel(c, H; A = A, lcon = lcon, ucon = ucon, lvar = lvar, uvar = uvar)

Create a Quadratic model $min ~\tfrac{1}{2} x^T H x + c^T x + c_0$ with optional bounds lvar ≦ x ≦ uvar and optional linear constraints lcon ≦ Ax ≦ ucon. The user should only give the lower triangle of H to the QuadraticModel constructor.

With the first constructor, if sortcols = true, then Hcols and Acols are sorted in ascending order (Hrows, Hvals and Arows, Avals are then sorted accordingly).

You can also use QPSReader.jl to create a Quadratic model from a QPS file:

using QPSReader
 qps = readqps("QAFIRO.SIF")
-qp = QuadraticModel(qps)

The instance of QuadraticModel{T, S, D} created contains the fields:

Using NLPModelsModifiers.SlackModel from NLPModelsModifiers.jl with a QuadraticModel based on a QPData with dense matrices will convert the field data to a QPData with SparseMatricesCOO.

Its in-place variant SlackModel! specific to QuadraticModels will only work with a QuadraticModel based on a QPData with SparseMatricesCOO.

source
QuadraticModels.postsolveMethod
sol = postsolve(qm::QuadraticModel{T, S}, psqm::PresolvedQuadraticModel{T, S}, 
-                sol_in::QMSolution{S}) where {T, S}

Retrieve the solution sol = (x, y, s_l, s_u) of the original QP qm given the solution of the presolved QP (psqm) sol_in of type QMSolution. sol_in.s_l and sol_in.s_u can be sparse or dense vectors, but the output sol.s_l and sol.s_u are dense vectors.

source
QuadraticModels.presolveMethod
stats_ps = presolve(qm::QuadraticModel{T, S}; fixed_vars_only = false, kwargs...)

Apply a presolve routine to qm and returns a GenericExecutionStats from the package SolverCore.jl. The presolve operations currently implemented are:

  • remove empty rows
  • remove singleton rows
  • fix linearly unconstrained variables (lps)
  • remove free linear singleton columns whose associated variable does not appear in the hessian
  • remove fixed variables

The PresolvedQuadraticModel{T, S} <: AbstractQuadraticModel{T, S} is located in the solver_specific field:

psqm = stats_ps.solver_specific[:presolvedQM]

and should be used to call postsolve. Use fixed_vars_only = true if you only want to remove fixed variables. Maximization problems are transformed to minimization problems. If you need the objective of a presolved maximization problem, make sure to take the opposite of the objective of the presolved problem.

If the presolved problem has 0 variables, stats_ps.solution contains a solution of the primal problem, stats_ps.multipliers is a zero SparseVector, and, if we define

s = qm.data.c + qm.data.H * stats_ps.solution

stats_ps.multipliers_L is the positive part of s and stats_ps.multipliers_U is the opposite of the negative part of s. The presolve operations are inspired from MathOptPresolve.jl, and from:

source
+qp = QuadraticModel(qps)

The instance of QuadraticModel{T, S, D} created contains the fields:

Using NLPModelsModifiers.SlackModel from NLPModelsModifiers.jl with a QuadraticModel based on a QPData with dense matrices will convert the field data to a QPData with SparseMatricesCOO.

Its in-place variant SlackModel! specific to QuadraticModels will only work with a QuadraticModel based on a QPData with SparseMatricesCOO.

source
QuadraticModels.postsolveMethod
sol = postsolve(qm::QuadraticModel{T, S}, psqm::PresolvedQuadraticModel{T, S}, 
+                sol_in::QMSolution{S}) where {T, S}

Retrieve the solution sol = (x, y, s_l, s_u) of the original QP qm given the solution of the presolved QP (psqm) sol_in of type QMSolution. sol_in.s_l and sol_in.s_u can be sparse or dense vectors, but the output sol.s_l and sol.s_u are dense vectors.

source
QuadraticModels.presolveMethod
stats_ps = presolve(qm::QuadraticModel{T, S}; fixed_vars_only = false, kwargs...)

Apply a presolve routine to qm and returns a GenericExecutionStats from the package SolverCore.jl. The presolve operations currently implemented are:

  • remove empty rows
  • remove singleton rows
  • fix linearly unconstrained variables (lps)
  • remove free linear singleton columns whose associated variable does not appear in the hessian
  • remove fixed variables

The PresolvedQuadraticModel{T, S} <: AbstractQuadraticModel{T, S} is located in the solver_specific field:

psqm = stats_ps.solver_specific[:presolvedQM]

and should be used to call postsolve. Use fixed_vars_only = true if you only want to remove fixed variables. Maximization problems are transformed to minimization problems. If you need the objective of a presolved maximization problem, make sure to take the opposite of the objective of the presolved problem.

If the presolved problem has 0 variables, stats_ps.solution contains a solution of the primal problem, stats_ps.multipliers is a zero SparseVector, and, if we define

s = qm.data.c + qm.data.H * stats_ps.solution

stats_ps.multipliers_L is the positive part of s and stats_ps.multipliers_U is the opposite of the negative part of s. The presolve operations are inspired from MathOptPresolve.jl, and from:

source
diff --git a/dev/search/index.html b/dev/search/index.html index 0ecf295..912e04e 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · QuadraticModels.jl

Loading search...

    +Search · QuadraticModels.jl

    Loading search...

      diff --git a/dev/tutorial/index.html b/dev/tutorial/index.html index 6db7d90..2f3a150 100644 --- a/dev/tutorial/index.html +++ b/dev/tutorial/index.html @@ -1,2 +1,2 @@ -Tutorial · QuadraticModels.jl
      +Tutorial · QuadraticModels.jl