6#include <json/writer.h>
8#include "antares-xpansion/benders/output/OutputWriter.h"
9#include "antares-xpansion/xpansion_interfaces/Clock.h"
22 std::shared_ptr<Clock> _clock;
23 std::filesystem::path _filename;
24 std::ofstream _jsonOut_l;
37 JsonWriter(std::shared_ptr<Clock> p_clock,
const std::filesystem::path& json_filename);
39 JsonWriter(
const std::filesystem::path& json_filename,
const Json::Value& json_file_content);
71 void write_iteration(
const Iteration& iteration_data,
const size_t iteration_num)
override;
72 void write_solver_name(
const std::string& solver_name)
override;
73 void write_master_name(
const std::string& master_name)
override;
74 void write_log_level(
const int log_level)
override;
75 void write_solution(
const SolutionData& solution)
override;
76 void write_nbweeks(
const int nb_weeks)
override;
77 void write_duration(
const double duration)
override;
78 std::string solution_status()
const override;
79 void WriteProblem(
const ProblemData& problem_data)
override;
80 void WriteProblemFormat(
const std::string format)
override;
JsonWriter class to describe the execuion session of an antares xpansion optimization in a json file.
Definition JsonWriter.h:20
virtual void update_solution(const SolutionData &solution_data)
saves some entries to be later written to the json file
Definition JsonWriter.cpp:129
void updateBeginTime() override
updates the execution begin time
Definition JsonWriter.cpp:44
void updateEndTime() override
updates the end of execution time
Definition JsonWriter.cpp:49
virtual void dump()
write the json data into a file
Definition JsonWriter.cpp:154
JsonWriter()=delete
JsonWriter default constructor.
virtual ~JsonWriter()=default
destructor of class JsonWriter
void initialize()
initialize outputs
Definition JsonWriter.cpp:38
OutputWriter class to describe the execuion session of an antares xpansion optimization in a log file...
Definition OutputWriter.h:103
Definition OutputWriter.h:40
struct containing some entries to be later written to the json file
Definition OutputWriter.h:83
Definition OutputWriter.h:91
struct saves some entries to be later written to the json file
Definition OutputWriter.h:64