Browse Source

Made the default multiplier matching the selected equation solver.

tempestpy_adaptions
TimQu 7 years ago
parent
commit
b8794fd9c8
  1. 15
      src/storm/solver/Multiplier.cpp

15
src/storm/solver/Multiplier.cpp

@ -58,6 +58,21 @@ namespace storm {
template<typename ValueType>
std::unique_ptr<Multiplier<ValueType>> MultiplierFactory<ValueType>::create(Environment const& env, storm::storage::SparseMatrix<ValueType> const& matrix) {
auto type = env.solver().multiplier().getType();
// Adjust the multiplier type if an eqsolver was specified but not a multiplier
if (!env.solver().isLinearEquationSolverTypeSetFromDefaultValue() && env.solver().multiplier().isTypeSetFromDefault()) {
bool changed = false;
if (env.solver().getLinearEquationSolverType() == EquationSolverType::Gmmxx && type != MultiplierType::Gmmxx) {
type = MultiplierType::Gmmxx;
changed = true;
} else if (env.solver().getLinearEquationSolverType() == EquationSolverType::Native && type != MultiplierType::Native) {
type = MultiplierType::Native;
changed = true;
}
STORM_LOG_INFO_COND(!changed, "Selecting '" + toString(type) + "' as the multiplier type to match the selected equation solver. If you want to override this, please explicitly specify a different multiplier type.");
}
switch (env.solver().multiplier().getType()) {
case MultiplierType::Gmmxx:
return std::make_unique<GmmxxMultiplier<ValueType>>(matrix);

Loading…
Cancel
Save