3#include <boost/optional.hpp>
16template<
typename SolutionType>
104 void setBounds(SolutionType
const& lower, SolutionType
const& upper);
116 SolutionType
const&
getLowerBound(uint64_t
const& index)
const;
135 SolutionType
const&
getUpperBound(uint64_t
const& index)
const;
177 void setBounds(std::vector<SolutionType>
const& lower, std::vector<SolutionType>
const& upper);
228 void showProgressIterative(uint64_t iterations, boost::optional<uint64_t>
const& bound = boost::none)
const;
278 void createUpperBoundsVector(std::unique_ptr<std::vector<SolutionType>>& upperBoundsVector, uint64_t length)
const;
298 uint64_t maximalNumberOfIterations)
const;
333 mutable boost::optional<storm::utility::ProgressMeasurement> progressMeasurement;
bool hasLowerBound(BoundType const &type=BoundType::Any) const
Retrieves whether this solver has a lower bound.
void setSolutionBoundsExact(std::vector< SolutionType > const &x) const
Reports the given solution as an exact one, i.e.
void setRelevantValues(storm::storage::BitVector &&valuesOfInterest)
Sets the relevant values.
void setSolutionBounds(SolutionBounds< SolutionType > bounds) const
Stores sound bounds on the solution that were obtained while solving.
bool hasCustomTerminationCondition() const
Retrieves whether a custom termination condition has been set.
std::unique_ptr< TerminationCondition< SolutionType > > const & getTerminationConditionPointer() const
void showProgressIterative(uint64_t iterations, boost::optional< uint64_t > const &bound=boost::none) const
Shows progress if this solver is asked to do so.
void setTerminationCondition(std::unique_ptr< TerminationCondition< SolutionType > > terminationCondition)
Sets a custom termination condition that is used together with the regular termination condition of t...
void setBounds(SolutionType const &lower, SolutionType const &upper)
Sets bounds for the solution that can potentially be used by the solver.
boost::optional< storm::storage::BitVector > const & getOptionalRelevantValues() const
boost::optional< SolutionType > lowerBound
std::vector< SolutionType > const & getSolutionUpperBounds() const
storm::storage::BitVector const & getRelevantValues() const
Retrieves the relevant values (if there are any).
bool hasUpperBound(BoundType const &type=BoundType::Any) const
Retrieves whether this solver has an upper bound.
std::unique_ptr< TerminationCondition< SolutionType > > terminationCondition
bool isShowProgressSet() const
Retrieves whether progress is to be shown.
bool hasExactSolutionBounds() const
Retrieves whether the bounds computed by the last call to this solver coincide.
SolutionType const & getUpperBound() const
Retrieves the upper bound (if there is any).
void setBoundsFromOtherSolver(AbstractEquationSolver< SolutionType > const &other)
void setSolutionBoundsFromPrecision(std::vector< SolutionType > const &x, SolutionType const &precision, bool relative) const
Turns a precision that the solving procedure is known to have achieved into sound bounds on the solut...
SolutionBounds< SolutionType > const & getSolutionBounds() const
Retrieves both bounds at once, either of which may be unset.
std::vector< SolutionType > const & getLowerBounds() const
Retrieves a vector containing the lower bounds (if there are any).
void setShowProgress(bool verbose, uint64_t delay=5)
Configures whether this solver should show progress during iterative solving.
bool hasSolutionLowerBounds() const
Retrieves whether the last call to this solver computed a sound lower resp.
void setUpperBounds(std::vector< SolutionType > const &values)
Sets upper bounds for the solution that can potentially be used by the solver.
SolverStatus updateStatus(SolverStatus status, std::vector< SolutionType > const &x, SolverGuarantee const &guarantee, uint64_t iterations, uint64_t maximalNumberOfIterations) const
Update the status of the solver with respect to convergence, early termination, abortion,...
boost::optional< SolutionType > upperBound
void createUpperBoundsVector(std::vector< SolutionType > &upperBoundsVector) const
void setLowerBound(SolutionType const &value)
Sets a lower bound for the solution that can potentially be used by the solver.
boost::optional< storm::storage::BitVector > relevantValues
void startMeasureProgress(uint64_t startingIteration=0) const
Starts to measure progress.
void resetTerminationCondition()
Removes a previously set custom termination condition.
TerminationCondition< SolutionType > const & getTerminationCondition() const
Retrieves the custom termination condition (if any was set).
SolutionType const & getLowerBound() const
Retrieves the lower bound (if there is any).
bool hasRelevantValues() const
Retrieves whether this solver has particularly relevant values.
void clearRelevantValues()
Removes the values of interest (if there were any).
bool hasSolutionUpperBounds() const
std::vector< SolutionType > const & getUpperBounds() const
Retrieves a vector containing the upper bounds (if there are any).
bool terminateNow(std::vector< SolutionType > const &values, SolverGuarantee const &guarantee) const
Checks whether the solver can terminate wrt.
void clearSolutionBounds() const
Discards any bounds on the solution obtained by a previous call.
void clearBounds()
Removes all specified solution bounds.
boost::optional< std::vector< SolutionType > > upperBounds
void reportStatus(SolverStatus status, boost::optional< uint64_t > const &iterations=boost::none) const
Report the current status of the solver.
void createLowerBoundsVector(std::vector< SolutionType > &lowerBoundsVector) const
uint64_t getShowProgressDelay() const
Retrieves the delay between progress emissions.
void finalizeSolutionBounds(std::vector< SolutionType > const &x) const
Settles the bounds to report once solving is over: the ones handed to this solver beforehand are fold...
boost::optional< std::vector< SolutionType > > lowerBounds
void setUpperBound(SolutionType const &value)
Sets an upper bound for the solution that can potentially be used by the solver.
void setLowerBounds(std::vector< SolutionType > const &values)
Sets lower bounds for the solution that can potentially be used by the solver.
std::vector< SolutionType > const & getSolutionLowerBounds() const
Retrieves sound bounds on the solution that the last call to this solver computed.
A bit vector that is internally represented as a vector of 64-bit values.
carl::BoundType BoundType
Type describing the interval bounds.
Sound lower and upper bounds on a solution vector.