@ -10,17 +10,17 @@ namespace storm {
namespace solver {
template < typename ValueType >
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( std : : unique_ptr < LinearEquationSolverFactory < ValueType > > & & linearEquationSolverFactory , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolver < ValueType > ( std : : move ( linearEquationSolverFactory ) ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
// Intentionally left empty.
}
template < typename ValueType >
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( storm : : storage : : SparseMatrix < ValueType > const & A , std : : unique_ptr < LinearEquationSolverFactory < ValueType > > & & linearEquationSolverFactory , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolver < ValueType > ( A , std : : move ( linearEquationSolverFactory ) ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( storm : : storage : : SparseMatrix < ValueType > const & A , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolver < ValueType > ( A ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
// Intentionally left empty.
}
template < typename ValueType >
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( storm : : storage : : SparseMatrix < ValueType > & & A , std : : unique_ptr < LinearEquationSolverFactory < ValueType > > & & linearEquationSolverFactory , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolver < ValueType > ( std : : move ( A ) , std : : move ( linearEquationSolverFactory ) ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
LpMinMaxLinearEquationSolver < ValueType > : : LpMinMaxLinearEquationSolver ( storm : : storage : : SparseMatrix < ValueType > & & A , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolver < ValueType > ( std : : move ( A ) ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
// Intentionally left empty.
}
@ -113,7 +113,7 @@ namespace storm {
template < typename ValueType >
MinMaxLinearEquationSolverRequirements LpMinMaxLinearEquationSolver < ValueType > : : getRequirements ( Environment const & env , boost : : optional < storm : : solver : : OptimizationDirection > const & direction , bool const & hasInitialScheduler ) const {
MinMaxLinearEquationSolverRequirements requirements ( this - > linearEquationSolverFactory - > getRequirements ( env , LinearEquationSolverTask : : Multiply ) ) ;
MinMaxLinearEquationSolverRequirements requirements ;
// In case we need to retrieve a scheduler, the solution has to be unique
if ( ! this - > hasUniqueSolution ( ) & & this - > isTrackSchedulerSet ( ) ) {
@ -127,38 +127,10 @@ namespace storm {
return requirements ;
}
template < typename ValueType >
LpMinMaxLinearEquationSolverFactory < ValueType > : : LpMinMaxLinearEquationSolverFactory ( ) : StandardMinMaxLinearEquationSolverFactory < ValueType > ( ) , lpSolverFactory ( std : : make_unique < storm : : utility : : solver : : LpSolverFactory < ValueType > > ( ) ) {
// Intentionally left empty
}
template < typename ValueType >
LpMinMaxLinearEquationSolverFactory < ValueType > : : LpMinMaxLinearEquationSolverFactory ( std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolverFactory < ValueType > ( ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
// Intentionally left empty
}
template < typename ValueType >
LpMinMaxLinearEquationSolverFactory < ValueType > : : LpMinMaxLinearEquationSolverFactory ( std : : unique_ptr < LinearEquationSolverFactory < ValueType > > & & linearEquationSolverFactory , std : : unique_ptr < storm : : utility : : solver : : LpSolverFactory < ValueType > > & & lpSolverFactory ) : StandardMinMaxLinearEquationSolverFactory < ValueType > ( std : : move ( linearEquationSolverFactory ) ) , lpSolverFactory ( std : : move ( lpSolverFactory ) ) {
// Intentionally left empty
}
template < typename ValueType >
std : : unique_ptr < MinMaxLinearEquationSolver < ValueType > > LpMinMaxLinearEquationSolverFactory < ValueType > : : create ( Environment const & env ) const {
STORM_LOG_THROW ( env . solver ( ) . minMax ( ) . getMethod ( ) = = MinMaxMethod : : LinearProgramming , storm : : exceptions : : InvalidEnvironmentException , " This min max solver does not support the selected technique. " ) ;
STORM_LOG_ASSERT ( this - > lpSolverFactory , " Lp solver factory not initialized. " ) ;
STORM_LOG_ASSERT ( this - > linearEquationSolverFactory , " Linear equation solver factory not initialized. " ) ;
std : : unique_ptr < MinMaxLinearEquationSolver < ValueType > > result = std : : make_unique < LpMinMaxLinearEquationSolver < ValueType > > ( this - > linearEquationSolverFactory - > clone ( ) , this - > lpSolverFactory - > clone ( ) ) ;
result - > setRequirementsChecked ( this - > isRequirementsCheckedSet ( ) ) ;
return result ;
}
template class LpMinMaxLinearEquationSolver < double > ;
template class LpMinMaxLinearEquationSolverFactory < double > ;
# ifdef STORM_HAVE_CARL
template class LpMinMaxLinearEquationSolver < storm : : RationalNumber > ;
template class LpMinMaxLinearEquationSolverFactory < storm : : RationalNumber > ;
# endif
}
}