Skip to content

Commit

Permalink
[Driver] Improve output filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Aug 23, 2023
1 parent 996aaf5 commit 3b25783
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/alpaqa/src/driver/alpaqa-driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ void store_solution(const fs::path &sol_output_dir, std::ostream &os,
auto timestamp_str = std::to_string(results.timestamp);
auto rnd_str = random_hex_string(std::random_device());
auto name = results.problem.path.stem().string();
auto suffix = '_' + name + '_' + timestamp_str + '_' + rnd_str;
if (name == "PROBLEM")
name = results.problem.name;
auto suffix = '_' + name + '_' + timestamp_str + '_' + rnd_str;
fs::create_directories(sol_output_dir);
std::array solutions{
std::tuple{"solution", "sol_x", &sol_res.solution},
Expand Down

0 comments on commit 3b25783

Please sign in to comment.