ZonoOpt 2.4.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ZonoOpt::SolverSettings Struct Referenceabstract

Abstract base for all solver settings. More...

#include <SolverDataStructures.hpp>

Inheritance diagram for ZonoOpt::SolverSettings:
Inheritance graph
[legend]

Public Member Functions

virtual std::unique_ptr< SolverSettingsclone () const =0
 Polymorphic copy. Must be overridden by every concrete subclass.
 
virtual std::string solver_name () const =0
 Return name of the solver backend selected by this settings type, e.g., "ZonoOpt", "Gurobi", "SCIP".
 
virtual void verify_available () const
 Verify the solver backend selected by this settings type is usable.
 
virtual ~SolverSettings ()=default
 

Detailed Description

Abstract base for all solver settings.

The dynamic type of the SolverSettings instance passed to ZonoOpt's optimization routines selects which solver backend is used:

Derived classes implement clone() so the program-wide default settings can hold a polymorphic copy (see get_default_solver_settings / set_default_solver_settings).

Constructor & Destructor Documentation

◆ ~SolverSettings()

virtual ZonoOpt::SolverSettings::~SolverSettings ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< SolverSettings > ZonoOpt::SolverSettings::clone ( ) const
pure virtual

Polymorphic copy. Must be overridden by every concrete subclass.

Implemented in ZonoOpt::GurobiSettings, ZonoOpt::SCIPSettings, and ZonoOpt::OptSettings.

◆ solver_name()

virtual std::string ZonoOpt::SolverSettings::solver_name ( ) const
pure virtual

Return name of the solver backend selected by this settings type, e.g., "ZonoOpt", "Gurobi", "SCIP".

Returns
std::string

Implemented in ZonoOpt::GurobiSettings, ZonoOpt::SCIPSettings, and ZonoOpt::OptSettings.

◆ verify_available()

virtual void ZonoOpt::SolverSettings::verify_available ( ) const
inlinevirtual

Verify the solver backend selected by this settings type is usable.

Called by set_default_solver_settings(); should throw std::runtime_error if the backend cannot be initialized (e.g., GurobiSettings throws if the Gurobi library cannot be dynamically loaded). Default implementation is a no-op, appropriate for the internal solver which is always available.

Exceptions
std::runtime_errorif the backend cannot be initialized (subclass implementations only; the default no-op does not throw).

Reimplemented in ZonoOpt::GurobiSettings, and ZonoOpt::SCIPSettings.


The documentation for this struct was generated from the following file: