Skip to content

HMath.Optimization.Constrained

Module index · Numerical conventions

Description

Dense bounded reference constrained optimization. Inequalities use g(x)<=0. LP uses nonnegative variables and Ax<=b, supports negative right-hand sides through phase I, and reports infeasibility/unboundedness. Revised simplex has an explicit feasible-basis contract. Convex QP enumerates active sets up to a caller budget; it is intended for small problems, not a sparse QP backend.

On this page

API Purpose
Constraint Scalar Equality or LessEqual constraint over the parameter vector; inequality functions use the solver's <=0 convention.
Equality Declaration and type contract below.
LessEqual Declaration and type contract below.
feasibility Return maximum absolute equality or positive inequality violation, with checked values and gradients.
PenaltyMethod Constrained-optimization strategy selecting quadratic penalty,log barrier,augmented Lagrangian,or interior-point treatment.
QuadraticPenalty Declaration and type contract below.
LogBarrier Declaration and type contract below.
InteriorPoint Declaration and type contract below.
AugmentedLagrangian Declaration and type contract below.
constrainedMinimize Outer continuation or multiplier updates around the named constrained objective.
LPResult Linear-program primal solution,objective value,retained basis indices,and iteration count.
LPResult Declaration and type contract below.
lpPoint Returned primal variable vector of the linear program.
lpValue Objective value at the returned LP point.
lpBasis Zero-based basis indices retained by the simplex solution.
lpIterations Number of simplex iterations performed.
linearProgramming Primal two-phase simplex with Bland entering/leaving rules.
revisedSimplex Revised primal simplex, A*x=b,x>=0.
quadraticProgramming Strictly convex QP: min .5x'Hx+c'x, Ax<=b.
slsqp Sequential least-squares QP with an analytic Hessian and exact linearized equality/active inequality constraints.
cobyla Derivative-free constrained linear-approximation trust region.
weightedObjective Compose nonnegative scalarization weights and checked objective values; at least one weight must be positive.
paretoFront Return original indices of nondominated objective rows under componentwise minimization; duplicates remain nondominated.

Documentation

Constraint

data Constraint Source #

Scalar Equality or LessEqual constraint over the parameter vector; inequality functions use the solver's <=0 convention.

feasibility

feasibility :: [Constraint] -> [Double] -> Either MathError Double Source #

Return maximum absolute equality or positive inequality violation, with checked values and gradients.

PenaltyMethod

data PenaltyMethod Source #

Constrained-optimization strategy selecting quadratic penalty,log barrier,augmented Lagrangian,or interior-point treatment.

constrainedMinimize

constrainedMinimize :: PenaltyMethod -> OptimizeOptions -> Objective -> Gradient -> [Constraint] -> [Double] -> Either MathError OptimizeResult Source #

Outer continuation or multiplier updates around the named constrained objective. Every inner callback charges its nested objectiveconstraintgradient calls; barriers require strict feasibility.

LPResult

data LPResult Source #

Linear-program primal solution,objective value,retained basis indices,and iteration count.

Constructors

LPResult 

Fields

  • lpPoint :: [Double]

    Returned primal variable vector of the linear program.

  • lpValue :: Double

    Objective value at the returned LP point.

  • lpBasis :: [Int]

    Zero-based basis indices retained by the simplex solution.

  • lpIterations :: Int

    Number of simplex iterations performed.

Instances

Instances details
Show LPResult Source # 
Instance details

Defined in HMath.Optimization.Constrained

Eq LPResult Source # 
Instance details

Defined in HMath.Optimization.Constrained

linearProgramming

linearProgramming :: Int -> Double -> [Double] -> [[Double]] -> [Double] -> Either MathError LPResult Source #

Primal two-phase simplex with Bland entering/leaving rules. Tolerance is used for feasibility and reduced costs, not to round returned variable data.

revisedSimplex

revisedSimplex :: Int -> Double -> [Double] -> [[Double]] -> [Double] -> [Int] -> Either MathError LPResult Source #

Revised primal simplex, A*x=b,x>=0. A basis must have m distinct columns and B^-1*b >=0. B is solved afresh each pivot; no tableau is materialized.

quadraticProgramming

quadraticProgramming :: Int -> Double -> [[Double]] -> [Double] -> [[Double]] -> [Double] -> Either MathError OptimizeResult Source #

Strictly convex QP: min .5*x'Hx+c'x, A*x<=b. Active-set enumeration provides a correctness reference and a hard subset budget. H must be SPD.

slsqp

slsqp :: OptimizeOptions -> Objective -> Gradient -> Hessian -> [Constraint] -> [Double] -> Either MathError OptimizeResult Source #

Sequential least-squares QP with an analytic Hessian and exact linearized equality/active inequality constraints. Merit backtracking globalizes steps.

cobyla

cobyla :: Double -> OptimizeOptions -> Objective -> [Objective] -> [Double] -> Either MathError OptimizeResult Source #

Derivative-free constrained linear-approximation trust region. This bounded CPU variant uses an L-infinity trust box and axis interpolation simplex. It solves each linear model as an LP, rather than relabeling a penalty solver.

weightedObjective

weightedObjective :: [Double] -> [Objective] -> Objective Source #

Compose nonnegative scalarization weights and checked objective values; at least one weight must be positive.

paretoFront

paretoFront :: [[Double]] -> Either MathError [Int] Source #

Return original indices of nondominated objective rows under componentwise minimization; duplicates remain nondominated.