diff --git a/src/settings/SettingsManager.cpp b/src/settings/SettingsManager.cpp index 53d31f6f0..a9eac4a9a 100644 --- a/src/settings/SettingsManager.cpp +++ b/src/settings/SettingsManager.cpp @@ -110,9 +110,30 @@ namespace storm { if (optionActive) { setOptionsArguments(activeOptionName, activeOptionIsShortName ? this->shortNameToOptions : this->longNameToOptions, argumentCache); } - - // Finally check whether all modules are okay with the current settings. - this->checkAllModules(); + + if (storm::settings::generalSettings().isConfigSet()) { + std::map> configurationFileSettings = parseConfigFile(storm::settings::generalSettings().getConfigFilename()); + + for (auto const& optionArgumentsPair : configurationFileSettings) { + auto options = this->longNameToOptions.find(optionArgumentsPair.first); + + // We don't need to check whether this option exists or not, because this is already checked when + // parsing the configuration file. + + // Now go through all the matching options and set them according to the values. + for (auto option : options->second) { + if (option->getHasOptionBeenSet()) { + // If the option was already set from the command line, we issue a warning and ignore the + // settings from the configuration file. + STORM_LOG_WARN("The option '" << option->getLongName() << " of module '" << option->getModuleName() << "' has been set in the configuration file, but was overriden on the command line."); + } else { + // If, however, the option has not been set yet, we try to assign values ot its arguments + // based on the argument strings. + setOptionArguments(optionArgumentsPair.first, option, optionArgumentsPair.second); + } + } + } + } } void SettingsManager::setFromConfigurationFile(std::string const& configFilename) { @@ -293,6 +314,23 @@ namespace storm { return true; } + void SettingsManager::setOptionArguments(std::string const& optionName, std::shared_ptr