|
Antares Simulator
Power System Simulator
|
Public Types | |
| using | Ptr = std::shared_ptr< Study > |
| using | Set = std::set< Ptr > |
| Set of studies. | |
| using | List = std::list< Ptr > |
| List of studies. | |
| using | SetsOfAreas = Antares::Data::Sets |
| Multiple sets of areas. | |
| using | FileExtension = std::string |
| Extension filename. | |
Public Member Functions | |
Constructor & Destructor | |
| Study (bool forTheSolver=false) | |
| Default Constructor. More... | |
| virtual | ~Study () |
| Destructor. | |
Loading/Saving | |
| void | createAsNew () |
| Create a clean study. | |
| void | relocate (const std::filesystem::path &newFolder) |
| Relocate the study into a new folder. More... | |
| bool | loadFromFolder (const std::string &path, const StudyLoadOptions &options) |
| Load a study from a folder. More... | |
| void | clear () |
| Clear all ressources held by the study. | |
| void | reloadCorrelation () |
| Reload all correlation. | |
| bool | reloadXCastData () |
| Reload all XCast Data. | |
| bool | saveToFolder (const AnyString &newfolder) |
| Save the study into a folder. More... | |
| bool | resetFolderIcon () const |
| Reset the folder icon (Windows only) More... | |
Invalidate | |
| bool | forceReload (bool reload=false) const |
| Invalidate the whole study. More... | |
| void | markAsModified () const |
| Mark the whole study as modified. | |
Time-series | |
| void | resizeAllTimeseriesNumbers (uint n) |
| Resize all matrices dedicated to the sampled timeseries numbers. More... | |
| template<TimeSeriesType TimeSeriesT> | |
| void | storeTimeSeriesNumbers (Solver::IResultWriter &resultWriter) const |
| Store the timeseries numbers. More... | |
Time-series Generators | |
| template<TimeSeriesType TS> | |
| void | destroyTSGeneratorData () |
| Destroy all data of the TS generator '@TS'. | |
| bool | importTimeseriesIntoInput () |
| Import all time-series into the input folder. More... | |
Internal Data TS-Generators / Series | |
| unsigned | getNumberOfCoresPerMode (unsigned nbLogicalCores, int ncMode) |
| Computes a raw number of cores table. More... | |
| void | getNumberOfCores (const bool forceParallel, const uint nbYearsParallelForced) |
| Computes number of cores. More... | |
| void | removeTimeseriesIfTSGeneratorEnabled () |
| Remove timeseries if ts-generator is enabled. | |
| bool | checkForFilenameLimits (bool output, const YString &chfolder=nullptr) const |
| Check for filename limits restriction on some platforms. More... | |
Memory management | |
| void | ensureDataAreLoadedForAllBindingConstraints () |
| Load all matrices within the binding constraints if not already done. More... | |
Logs | |
| void | importLogsToOutputFolder (Solver::IResultWriter &resultWriter) const |
| Copy the log file from the 'logs' folder to the current output folder. | |
Public Member Functions inherited from Antares::Data::LayerData | |
| LayerData (size_t activeLayer, bool showLayer) | |
Static Public Member Functions | |
| static bool | TitleFromStudyFolder (const AnyString &folder, YString &out, bool warnings=false) |
| Extract the title of a study. More... | |
| static bool | IsRootStudy (const AnyString &folder) |
| Get if a folder if a study. More... | |
| static bool | IsRootStudy (const AnyString &folder, YString &buffer) |
| Get if a folder if a study. More... | |
| static bool | IsInsideStudyFolder (const AnyString &path, YString &location, YString &title) |
| Check if a path is within a study folder. More... | |
Public Attributes | |
Paths | |
| std::filesystem::path | folder |
| The source folder of the study. | |
| std::filesystem::path | folderInput |
| The input folder. | |
| std::filesystem::path | folderOutput |
| The output folder. | |
| std::filesystem::path | folderSettings |
| The settings folder. | |
Binding constraints | |
| BindingConstraintsRepository | bindingConstraints |
| Binding constraints. | |
| BindingConstraintGroupRepository | bindingConstraintsGroups |
Correlation matrices used by the prepro | |
| Correlation | preproLoadCorrelation |
| Correlation matrix for the load time series generated by the prepro. | |
| Correlation | preproSolarCorrelation |
| Correlation matrix for the solar time series generated by the prepro. | |
| Correlation | preproWindCorrelation |
| Correlation matrix for the wind time series generated by the prepro. | |
| Correlation | preproHydroCorrelation |
| Correlation matrix for the hydro time series generated by the prepro. | |
Groups | |
| SetsOfAreas | setsOfAreas |
| Sets of areas. | |
Cache | |
| |
| YString | buffer |
| A buffer for temporary operations on filename. | |
| Matrix ::BufferType | dataBuffer |
| A buffer for temporary operations on large amount of data. | |
| YString | bufferLoadingTS |
| A buffer used when loading time-series for dealing with filenames (prepro/series only) | |
| std::shared_ptr< Yuni::Job::QueueService > | pQueueService |
| The queue service that runs every set of parallel years. | |
Public Attributes inherited from Antares::Data::LayerData | |
| std::map< size_t, std::string > | layers |
| All available layers. | |
| size_t | activeLayerID |
| bool | showAllLayer |
Protected Member Functions | |
Loading | |
| bool | internalLoadFromFolder (const std::filesystem::path &path, const StudyLoadOptions &options) |
| Load a study from a folder. | |
| bool | internalLoadHeader (const std::filesystem::path &folder) |
| Load the study header. | |
| bool | internalLoadCorrelationMatrices (const StudyLoadOptions &options) |
| Load all correlation matrices. | |
| virtual bool | internalLoadBindingConstraints (const StudyLoadOptions &options) |
| Load all binding constraints. | |
| bool | internalLoadSets () |
| Load all set of areas and links. | |
| bool | internalLoadIni (const std::filesystem::path &path, const StudyLoadOptions &options) |
| void | loadModelerComponents () |
| Load extra modeler components for hybrid studies and verify compatibility. | |
| void | checkModelerDataCompatibility () const |
| void | parameterFiller (const StudyLoadOptions &options) |
Protected Member Functions inherited from Antares::Data::LayerData | |
| bool | saveLayers (const AnyString &filename) |
| void | loadLayers (const std::filesystem::path &filename) |
Check validity of Min Stable Power of Thermal Clusters | |
| StudyHeader | header |
| Header (general information about the study) | |
| void | computePThetaInfForThermalClusters () const |
| Check validity between Min Stable Power and capacity modulation for each thermal cluster in the all area in the study. Should be call then all inforation is suplied in to the thermal clusters. | |
Simulation | |
| SimulationComments | simulationComments |
| The current Simulation. | |
| int64_t | pStartTime |
| uint | maxNbYearsInParallel = 1 |
| uint | maxNbYearsInParallel_save = 0 |
| uint | nbYearsParallelRaw = 1 |
| uint | minNbYearsInParallel = 0 |
| uint | minNbYearsInParallel_save = 0 |
| Parameters | parameters |
| Parameters. | |
| Date::Calendar | calendar |
| Calendar. More... | |
| Date::Calendar | calendarOutput |
| Calendar output. More... | |
| void | performTransformationsBeforeLaunchingSimulation () |
| Perform several modifications required when launching a simulation (like computing the DSM values) More... | |
| bool | initializeRuntimeInfos () |
| Initialize runtime informations required by the solver. | |
| void | prepareOutput () |
| Prepare the output where the results of the simulation will be written. | |
| void | saveAboutTheStudy (Solver::IResultWriter &resultWriter) |
| void | initializeProgressMeter (bool tsGeneratorOnly) |
| Initialize the progress meter. | |
Areas | |
| AreaList | areas |
| All available areas. | |
| bool | modifyAreaNameIfAlreadyTaken (AreaName &out, const AreaName &basename) |
| Try to find a name for a new area. More... | |
| Area * | areaAdd (const AreaName &name, bool update=false) |
| Add an area and make all required initialization. More... | |
Scenario Builder | |
| std::unique_ptr< ScenarioBuilder::Sets > | scenarioRules |
| Rules for building scenarios (can be null) | |
| TimeSeries::TS | scenarioInitialHydroLevels |
| TimeSeries::TS | scenarioFinalHydroLevels |
| StudyRuntimeInfos | runtime |
| Runtime informations. More... | |
| UIRuntimeInfo * | uiinfo = nullptr |
| Specific data related to the User Interface. | |
| FileExtension | inputExtension = "txt" |
| The file extension for file within the input ('txt' or 'csv') More... | |
| Solver::Progression | progression |
| Progression about the current action performed on the study. | |
| void | scenarioRulesLoadIfNotAvailable () |
| Load the data related to the scenario builder if not available. | |
| void | scenarioRulesCreate () |
| Re-Initialize/Re-Load the scenario builder data. | |
| void | scenarioRulesDestroy () |
| Release the scenario builder. | |
TS Generators | |
| void * | cacheTSGenerator [timeSeriesCount] |
| Time-series generators used by the solver. More... | |
| const bool | usedByTheSolver |
| A non-zero value when the study will be used by the solver. More... | |
| Antares::Modeler::Data * | getModelerData () const |
Misc | |
| void | reduceMemoryUsage () |
| Release all unnecessary buffers. | |
| Antares::Data::Study::Study | ( | bool | forTheSolver = false | ) |
Default Constructor.
| forTheSolver | True to indicate that the study will be used for a simulation Consequently some preparations / shortcuts should be done |
| Area * Antares::Data::Study::areaAdd | ( | const AreaName & | name, |
| bool | update = false |
||
| ) |
Add an area and make all required initialization.
It is the safe way to add an area and it is mainly used by the GUI
| name | The name of the new area |
| bool Antares::Data::Study::checkForFilenameLimits | ( | bool | output, |
| const YString & | chfolder = nullptr |
||
| ) | const |
Check for filename limits restriction on some platforms.
On Windows, we can use filename with more than 256 characters. theoretically possible, but non working.
| output | True for checking output filenames, false for input |
| chfolder | The study folder to take into consideration |
|
protected |
Checks that the modeler data is compatible with the solver for hybrid studies. Currently, unsupported cases in the solver are :
| void Antares::Data::Study::ensureDataAreLoadedForAllBindingConstraints | ( | ) |
Load all matrices within the binding constraints if not already done.
This method is required by the interface when a saveAs is performed
| bool Antares::Data::Study::forceReload | ( | bool | reload = false | ) | const |
Invalidate the whole study.
Mark all JIT structures as invalidated. This will force the loading of missing data in memory and it will force the rewritten of any matrix.
| void Antares::Data::Study::getNumberOfCores | ( | const bool | forceParallel, |
| const uint | nbYearsParallelForced | ||
| ) |
Computes number of cores.
Getting the number of parallel years based on the number of cores level.
From the "Number of Cores" level (in GUI --> Advanced parameters), computes the real numbers of logical cores to be involved in the MC years parallelisation.
| unsigned Antares::Data::Study::getNumberOfCoresPerMode | ( | unsigned | nbLogicalCores, |
| int | ncMode | ||
| ) |
Computes a raw number of cores table.
The table associetes a raw number of cores to each level ("min", "low", "med", "high", "max").
| bool Antares::Data::Study::importTimeseriesIntoInput | ( | ) |
Import all time-series into the input folder.
This method should be used when the solver has finished its simulation and the data generated by the preprocessors must be imported in the input folder. The selection of time-series is controlled by the general data (timeSeriesToImport). When calling this routine, and if timeSeriesToImport is not equals to 0, the input folder will be modified.
|
static |
Check if a path is within a study folder.
| path | The path to check | |
| [out] | location | The location of the study folder (if any) |
| [out] | title | The title of the study folder (if any) |
|
static |
Get if a folder if a study.
| folder | A study folder |
|
static |
Get if a folder if a study.
| folder | A study folder |
| buffer | A buffer to reuse for temporary operations |
| bool Antares::Data::Study::loadFromFolder | ( | const std::string & | path, |
| const StudyLoadOptions & | options | ||
| ) |
Load a study from a folder.
| path | The path where data are located |
| bool Antares::Data::Study::modifyAreaNameIfAlreadyTaken | ( | AreaName & | out, |
| const AreaName & | basename | ||
| ) |
Try to find a name for a new area.
| out | The new name |
| basename | The root base name |
| void Antares::Data::Study::performTransformationsBeforeLaunchingSimulation | ( | ) |
Perform several modifications required when launching a simulation (like computing the DSM values)
| void Antares::Data::Study::relocate | ( | const std::filesystem::path & | newFolder | ) |
Relocate the study into a new folder.
This method does not have any effect except modifying internal variables (folder, folderInput, ...).
| bool Antares::Data::Study::resetFolderIcon | ( | ) | const |
Reset the folder icon (Windows only)
| void Antares::Data::Study::resizeAllTimeseriesNumbers | ( | uint | n | ) |
Resize all matrices dedicated to the sampled timeseries numbers.
| n | A number of years |
| bool Antares::Data::Study::saveToFolder | ( | const AnyString & | newfolder | ) |
Save the study into a folder.
| folder | The folder where to write data |
|
inline |
Store the timeseries numbers.
| TimeSeriesT | The time-series set to store |
|
static |
Extract the title of a study.
| folder | A study folder | |
| [out] | out | The variable where the title will be written |
| warnings | False to prevent warnings/errors when loading |
| void* Antares::Data::Study::cacheTSGenerator[timeSeriesCount] |
Time-series generators used by the solver.
| Date::Calendar Antares::Data::Study::calendar |
Calendar.
When launched from the solver, this calendar does not take into consideration the leap year
| Date::Calendar Antares::Data::Study::calendarOutput |
Calendar output.
With leap year mode (if any), for the output results
| FileExtension Antares::Data::Study::inputExtension = "txt" |
The file extension for file within the input ('txt' or 'csv')
Since the v3.1, the file extensions in the input have been renamed into .txt, (instead of .csv)
| StudyRuntimeInfos Antares::Data::Study::runtime |
Runtime informations.
These informations are only needed when a study is processed.
| const bool Antares::Data::Study::usedByTheSolver |
A non-zero value when the study will be used by the solver.
If it is the case, some data may not be kept in memory, and some calculations must be done.