NetOptim 1.2.8
Loading...
Searching...
No Matches
solve.hpp File Reference

Convenience facades for driving netoptim oracles with the ellipsoid cutting-plane method. More...

#include <cstddef>
#include <ellalgo/cutting_plane.hpp>
#include <ellalgo/ell_config.hpp>
#include <tuple>
Include dependency graph for solve.hpp:

Go to the source code of this file.

Functions

auto default_options () -> Options
 Build an Options using the library's default tolerance.
template<typename O, typename S>
auto solve_network_feas (O &omega, S &space, const Options &options=default_options()) -> std::tuple< CuttingPlaneArrayType< S >, size_t >
 Find a feasible point for a network feasibility problem.
template<typename O, typename S, typename N>
auto solve_opt_scaling (O &omega, S &space, N &gamma, const Options &options=default_options()) -> std::tuple< CuttingPlaneArrayType< S >, size_t >
 Maximize the scaling ratio for an optimal matrix scaling problem.

Variables

constexpr double kDefaultTolerance = 1e-10
 Default convergence tolerance used by the solver facades.

Detailed Description

Convenience facades for driving netoptim oracles with the ellipsoid cutting-plane method.

Mirrors the Python sibling's solve_network_feas / solve_opt_scaling facades: both forward an Options object (defaulting to a sensible tolerance) to the ellalgo drivers, and the feasibility facade uses the feasibility driver (cutting_plane_feas).

Function Documentation

◆ default_options()

auto default_options ( ) ->Options
inline

Build an Options using the library's default tolerance.

◆ solve_network_feas()

template<typename O, typename S>
auto solve_network_feas ( O & omega,
S & space,
const Options & options = default_options() )->std::tuple< CuttingPlaneArrayType< S >, size_t >
inline

Find a feasible point for a network feasibility problem.

Template Parameters
Ofeasibility-oracle type (e.g. NetworkOracle)
Ssearch-space type (e.g. Ell)
Parameters
[in,out]omegafeasibility oracle
[in,out]spacesearch space; its center is the starting iterate
[in]optionsalgorithm control parameters
Returns
tuple (x_best, num_iters) as returned by cutting_plane_feas

◆ solve_opt_scaling()

template<typename O, typename S, typename N>
auto solve_opt_scaling ( O & omega,
S & space,
N & gamma,
const Options & options = default_options() )->std::tuple< CuttingPlaneArrayType< S >, size_t >
inline

Maximize the scaling ratio for an optimal matrix scaling problem.

Template Parameters
Ooptimality-oracle type (e.g. OptScalingOracle)
Ssearch-space type (e.g. Ell)
Nnumeric best-so-far type
Parameters
[in,out]omegaoptimality oracle
[in,out]spacesearch space; its center is the starting iterate
[in,out]gammabest-so-far optimal value, updated in place
[in]optionsalgorithm control parameters
Returns
tuple (x_best, num_iters) as returned by cutting_plane_optim

Variable Documentation

◆ kDefaultTolerance

double kDefaultTolerance = 1e-10
inlineconstexpr

Default convergence tolerance used by the solver facades.

Benchmarked with bench_optscaling on the project's fixed graph: the objective error scales as sqrt(tolerance), so 1e-10 yields ~1e-5 error at ~28% more runtime than 1e-8 (~1e-4 error). ellalgo's built-in 1e-20 is unreachable at double precision for most scales and only inflates the iteration count. Pass an explicit Options to override.