Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jan 8, 2025
1 parent ba6a212 commit eb4dd66
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class IMipSolution
virtual double getObjectiveValue() const = 0;
virtual double getOptimalValue(const IMipVariable* var) const = 0;
virtual std::vector<double> getOptimalValues(const std::vector<IMipVariable*>& vars) const = 0;
virtual const std::map<std::string, double>& solutionValues() const = 0;
virtual const std::map<std::string, double>& getOptimalValues() const = 0;
};

} // namespace Antares::Solver::Modeler::Api
2 changes: 1 addition & 1 deletion src/solver/modeler/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int main(int argc, const char** argv)
{
logs.info() << "Writing variables...";
std::ofstream sol_out(std::filesystem::current_path() / "solution.csv");
for (const auto& [name, value]: solution->solutionValues())
for (const auto& [name, value]: solution->getOptimalValues())
{
sol_out << name << " " << value << std::endl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class OrtoolsMipSolution final: public Api::IMipSolution
double getOptimalValue(const Api::IMipVariable* var) const override;
std::vector<double> getOptimalValues(
const std::vector<Api::IMipVariable*>& vars) const override;
const std::map<std::string, double>& solutionValues() const override;
const std::map<std::string, double>& getOptimalValues() const override;

private:
operations_research::MPSolver::ResultStatus status_;
Expand Down
2 changes: 1 addition & 1 deletion src/solver/modeler/ortoolsImpl/mipSolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ std::vector<double> OrtoolsMipSolution::getOptimalValues(
return solution;
}

const std::map<std::string, double>& OrtoolsMipSolution::solutionValues() const
const std::map<std::string, double>& OrtoolsMipSolution::getOptimalValues() const
{
return solution_;
}
Expand Down

0 comments on commit eb4dd66

Please sign in to comment.