lucid  0.0.2
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches

Base class for optimisation solvers. More...

#include <Optimiser.h>

Inheritance diagram for lucid::Optimiser:
lucid::AlglibOptimiser lucid::GurobiOptimiser lucid::HighsOptimiser lucid::SoplexOptimiser

Public Types

using SolutionCallback = std::function<void(bool, double, const Vector&, double, double, double)>
 Callback function called when the optimisation is done.

Public Member Functions

 Optimiser (std::string problem_log_file="", std::string iis_log_file="")
 Construct a new Optimiser object.
bool solve_fourier_barrier_synthesis (const FourierBarrierSynthesisProblem &problem, const SolutionCallback &cb) const
 Solve the FourierBarrierCertificate synthesis optimisation problem by solving the corresponding LP.
const std::string & problem_log_file () const
 Get read-only access to the problem log file of the solver.
const std::string & iis_log_file () const
 Get read-only access to the irreducible infeasible set log file of the solver.
bool has_problem_log_file () const
 Get read-only access to the problem log file of the solver.
bool has_iis_log_file () const
 Get read-only access to the irreducible infeasible set log file of the solver.
std::string & m_problem_log_file ()
 Get read-write access to the problem log file of the solver.
std::string & m_iis_log_file ()
 Get read-write access to the irreducible infeasible set log file of the solver.
bool should_log_problem () const
 Check whether the solver is configured to log the lp problem.
bool should_log_iis () const
 Check whether the solver is configured to log the iis.
virtual std::string to_string () const
 Obtain the string representation of this object.

Protected Member Functions

virtual bool solve_fourier_barrier_synthesis_impl (const FourierBarrierSynthesisProblem &params, const SolutionCallback &cb) const =0
 Implementation of the Fourier barrier synthesis solver.

Protected Attributes

std::string problem_log_file_
 File to log the problem to, if provided.
std::string iis_log_file_
 File to log the IIS (Irreducible Inconsistent Subsystem) to, if found.

Detailed Description

Base class for optimisation solvers.

This class provides a common interface for different optimisation backends (Gurobi, HiGHS, ALGLIB, SoPlex) used in the verification process.

Member Typedef Documentation

◆ SolutionCallback

using lucid::Optimiser::SolutionCallback = std::function<void(bool, double, const Vector&, double, double, double)>

Callback function called when the optimisation is done.

Parameters
successtrue if the optimisation was successful, false if no solution was found
obj_valobjective value. 0 if no solution was found
etaeta value. 0 if no solution was found
cc value. 0 if no solution was found
normactual norm of the barrier function. 0 if no solution was found

Constructor & Destructor Documentation

◆ Optimiser()

lucid::Optimiser::Optimiser ( std::string problem_log_file = "",
std::string iis_log_file = "" )
explicit

Construct a new Optimiser object.

If problem_log_file is provided, the optimiser will log the LP problem to the specified file. If iis_log_file is provided, the optimiser will log the Irreducible Inconsistent Subsystem (IIS) to the specified file if the problem is found to be infeasible.

Parameters
problem_log_filefile to log the problem to
iis_log_filefile to log the IIS to

Member Function Documentation

◆ has_iis_log_file()

bool lucid::Optimiser::has_iis_log_file ( ) const
inlinenodiscard

Get read-only access to the irreducible infeasible set log file of the solver.

Returns
irreducible infeasible set log file of the solver

◆ has_problem_log_file()

bool lucid::Optimiser::has_problem_log_file ( ) const
inlinenodiscard

Get read-only access to the problem log file of the solver.

Returns
problem log file of the solver

◆ iis_log_file()

const std::string & lucid::Optimiser::iis_log_file ( ) const
inlinenodiscard

Get read-only access to the irreducible infeasible set log file of the solver.

Returns
irreducible infeasible set log file of the solver

◆ m_iis_log_file()

std::string & lucid::Optimiser::m_iis_log_file ( )
inline

Get read-write access to the irreducible infeasible set log file of the solver.

Returns
irreducible infeasible set log file of the solver

◆ m_problem_log_file()

std::string & lucid::Optimiser::m_problem_log_file ( )
inline

Get read-write access to the problem log file of the solver.

Returns
problem log file of the solver

◆ problem_log_file()

const std::string & lucid::Optimiser::problem_log_file ( ) const
inlinenodiscard

Get read-only access to the problem log file of the solver.

Returns
problem log file of the solver

◆ should_log_iis()

bool lucid::Optimiser::should_log_iis ( ) const
inlinenodiscard

Check whether the solver is configured to log the iis.

Returns
true if the solver is configured to log the iis
false if the solver is not configured to log the iis

◆ should_log_problem()

bool lucid::Optimiser::should_log_problem ( ) const
inlinenodiscard

Check whether the solver is configured to log the lp problem.

Returns
true if the solver is configured to log the lp problem
false if the solver is not configured to log the lp problem

◆ solve_fourier_barrier_synthesis()

bool lucid::Optimiser::solve_fourier_barrier_synthesis ( const FourierBarrierSynthesisProblem & problem,
const SolutionCallback & cb ) const
nodiscard

Solve the FourierBarrierCertificate synthesis optimisation problem by solving the corresponding LP.

See FourierBarrierCertificate::synthesize for more details.

Parameters
problemproblem definition
cbcallback function called when the optimisation is done
Returns
true if the optimisation was successful
false if no solution was found (i.e., the problem is infeasible)

◆ solve_fourier_barrier_synthesis_impl()

virtual bool lucid::Optimiser::solve_fourier_barrier_synthesis_impl ( const FourierBarrierSynthesisProblem & params,
const SolutionCallback & cb ) const
nodiscardprotectedpure virtual

Implementation of the Fourier barrier synthesis solver.

It interfaces with the specific LP solver backend. See FourierBarrierCertificate::synthesize for more details.

Parameters
paramsproblem definition
cbcallback function called when the optimisation is done
Returns
true if the optimisation was successful
false if no solution was found (i.e., the problem is infeasible

Implemented in lucid::AlglibOptimiser, lucid::GurobiOptimiser, lucid::HighsOptimiser, and lucid::SoplexOptimiser.

◆ to_string()

std::string lucid::Optimiser::to_string ( ) const
nodiscardvirtual

Obtain the string representation of this object.

Returns
string representation of this object

Reimplemented in lucid::AlglibOptimiser, lucid::GurobiOptimiser, lucid::HighsOptimiser, and lucid::SoplexOptimiser.


The documentation for this class was generated from the following files: