Skip to content

Commit

Permalink
Add const qualifier, call set_solver earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Dec 20, 2024
1 parent 9e54271 commit f9c72b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cpp/lpnamer/main/ProblemGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ std::filesystem::path ProblemGeneration::updateProblems() {
const auto archive_path = options_.ArchivePath();
std::filesystem::path study_dir;

set_solver(study_dir, logger.get());

if (mode_ == SimulationInputMode::ARCHIVE) {
xpansion_output_dir =
options_.deduceXpansionDirIfEmpty(xpansion_output_dir, archive_path);
Expand Down Expand Up @@ -123,8 +125,6 @@ std::filesystem::path ProblemGeneration::updateProblems() {
auto weights_file = options_.WeightsFile();
auto unnamed_problems = options_.UnnamedProblems();

set_solver(study_dir, logger.get());

RunProblemGeneration(xpansion_output_dir, master_formulation,
additionalConstraintFilename_l, archive_path, logger,
log_file_path, weights_file, unnamed_problems);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ProblemGeneration {
explicit ProblemGeneration(ProblemGenerationOptions& options);
virtual ~ProblemGeneration() = default;
std::filesystem::path updateProblems();
ProblemGenerationOptions& options_;
const ProblemGenerationOptions& options_;

private:
virtual void RunProblemGeneration(
Expand Down

0 comments on commit f9c72b0

Please sign in to comment.