Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
JsonXpansionReader Class Reference

Class that reads a json file describing an antares-xpansion solution. More...

#include <JsonXpansionReader.h>

Public Member Functions

 JsonXpansionReader ()
 JsonXpansionReader default constructor.
 
virtual ~JsonXpansionReader ()=default
 JsonWriter default destructor.
 
void read (const std::filesystem::path &filename_p)
 reads a json file describing the execution of an antares xpansion optimisation and populates the jsonXpansionReader class attributes with the data from the file
 
int getBestIteration () const
 returns the index of the best iteration indicated in the json output file
 
int getLastIteration () const
 returns the index of the last iteration indicated in the json output file
 
Point getSolutionPoint () const
 returns the solution to the xpansion problem indicated in the json output file
 

Detailed Description

Class that reads a json file describing an antares-xpansion solution.

Note
does not consider if the json file was created from sequential, mpi or merge optimizers

Member Function Documentation

◆ getBestIteration()

int JsonXpansionReader::getBestIteration ( ) const

returns the index of the best iteration indicated in the json output file

Returns
iteration entry in the solution object of the read json if exists, Json::nullValue otherwise

◆ getLastIteration()

int JsonXpansionReader::getLastIteration ( ) const

returns the index of the last iteration indicated in the json output file

Returns
index of the last iteration in the read json if possible, Json::nullValue otherwise

◆ read()

void JsonXpansionReader::read ( const std::filesystem::path &  filename_p)

reads a json file describing the execution of an antares xpansion optimisation and populates the jsonXpansionReader class attributes with the data from the file

Parameters
filename_pname of the json file to read from

The documentation for this class was generated from the following files: