From 0f8fb8a4fab725e82e205432a08c3d748f708543 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Wed, 11 Dec 2024 12:45:20 +0100 Subject: [PATCH] system converter --- src/solver/CMakeLists.txt | 1 + src/solver/systemConverter/CMakeLists.txt | 25 ++++++++++ .../solver/systemConverter/systemConverter.h | 49 +++++++++++++++++++ .../systemConverter/systemConverter.cpp | 26 ++++++++++ 4 files changed, 101 insertions(+) create mode 100644 src/solver/systemConverter/CMakeLists.txt create mode 100644 src/solver/systemConverter/include/antares/solver/systemConverter/systemConverter.h create mode 100644 src/solver/systemConverter/systemConverter.cpp diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index b37cb7f1cf..acc17b3443 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -16,6 +16,7 @@ add_subdirectory(lps) add_subdirectory(misc) add_subdirectory(modelConverter) add_subdirectory(modelParser) +add_subdirectory(systemConverter) add_subdirectory(systemParser) add_subdirectory(modeler) add_subdirectory(optimisation) diff --git a/src/solver/systemConverter/CMakeLists.txt b/src/solver/systemConverter/CMakeLists.txt new file mode 100644 index 0000000000..de50a36e44 --- /dev/null +++ b/src/solver/systemConverter/CMakeLists.txt @@ -0,0 +1,25 @@ +set(SOURCES + systemConverter.cpp + include/antares/solver/systemConverter/systemConverter.h +) + +# Create the library +add_library(systemConverter STATIC ${SOURCES}) +add_library(Antares::systemConverter ALIAS systemConverter) + +# Specify include directories +target_include_directories(systemConverter + PUBLIC + $ +) + +# Link dependencies (if any) +target_link_libraries(systemConverter + PRIVATE + Antares::antares-study-system-model + Antares::systemParser +) + +install(DIRECTORY include/antares + DESTINATION "include" +) diff --git a/src/solver/systemConverter/include/antares/solver/systemConverter/systemConverter.h b/src/solver/systemConverter/include/antares/solver/systemConverter/systemConverter.h new file mode 100644 index 0000000000..928cdaf77d --- /dev/null +++ b/src/solver/systemConverter/include/antares/solver/systemConverter/systemConverter.h @@ -0,0 +1,49 @@ +/* + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ + +#pragma once +#include + +#include "antares/solver/systemParser/library.h" + +/* namespace Antares */ +/* { */ +/* namespace Study::SystemModel */ +/* { */ +/* class Library; */ +/* } */ + +/* namespace Solver::ModelParser */ +/* { */ +/* class Library; */ +/* } */ +/* } // namespace Antares */ + +namespace Antares::Solver::SystemConverter +{ +/* class UnknownTypeException: public std::runtime_error */ +/* { */ +/* public: */ +/* explicit UnknownTypeException(ModelParser::ValueType type); */ +/* }; */ + +/* Antares::Study::SystemModel::Library convert(const Antares::Solver::ModelParser::Library& library); */ +} // namespace Antares::Solver::SystemConverter diff --git a/src/solver/systemConverter/systemConverter.cpp b/src/solver/systemConverter/systemConverter.cpp new file mode 100644 index 0000000000..d36b9fcbf1 --- /dev/null +++ b/src/solver/systemConverter/systemConverter.cpp @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2024, RTE (https://www.rte-france.com) + * See AUTHORS.txt + * SPDX-License-Identifier: MPL-2.0 + * This file is part of Antares-Simulator, + * Adequacy and Performance assessment for interconnected energy networks. + * + * Antares_Simulator is free software: you can redistribute it and/or modify + * it under the terms of the Mozilla Public Licence 2.0 as published by + * the Mozilla Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Antares_Simulator is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Mozilla Public Licence 2.0 for more details. + * + * You should have received a copy of the Mozilla Public Licence 2.0 + * along with Antares_Simulator. If not, see . + */ + +#include "antares/solver/systemConverter/systemConverter.h" + +namespace Antares::Solver::SystemConverter +{ +} // namespace Antares::Solver::SystemConverter