Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#798 Update following DYN-2455 (following Part. 2)
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri Baron <[email protected]>
barondim committed Nov 21, 2024
1 parent 2c2febf commit 234cd4b
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sources/Inputs/include/NetworkManager.h
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ class NetworkManager {
* @brief Update the network conditioning status based on a component conditioning status
* @param componentInterface the data interface to use
*/
void updateConditioningStatus(const boost::shared_ptr<DYN::ComponentInterface> &componentInterface);
void updateConditioningStatus(const std::shared_ptr<DYN::ComponentInterface> &componentInterface);

private:
boost::shared_ptr<DYN::DataInterface> interface_; ///< data interface
12 changes: 6 additions & 6 deletions sources/Inputs/src/NetworkManager.cpp
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
#include <DYNTwoWTransformerInterface.h>
#include <DYNVoltageLevelInterface.h>
#include <DYNVscConverterInterface.h>
#include <boost/make_shared.hpp>


namespace dfl {
namespace inputs {
@@ -61,7 +61,7 @@ void NetworkManager::updateMapRegulatingBuses(BusMapRegulating &map, const std::
}
}

void NetworkManager::updateConditioningStatus(const boost::shared_ptr<DYN::ComponentInterface> &componentInterface) {
void NetworkManager::updateConditioningStatus(const std::shared_ptr<DYN::ComponentInterface> &componentInterface) {
if (componentInterface->hasInitialConditions()) {
isPartiallyConditioned_ = true;
} else {
@@ -293,7 +293,7 @@ void NetworkManager::buildTree() {
HvdcLine::ConverterType converterType;
if (converterDyn1->getConverterType() == DYN::ConverterInterface::ConverterType_t::VSC_CONVERTER) {
converterType = HvdcLine::ConverterType::VSC;
auto vscConverterDyn1 = boost::dynamic_pointer_cast<DYN::VscConverterInterface>(converterDyn1);
auto vscConverterDyn1 = std::dynamic_pointer_cast<DYN::VscConverterInterface>(converterDyn1);
updateConditioningStatus(vscConverterDyn1);
bool voltageRegulationOn = vscConverterDyn1->getVoltageRegulatorOn();
converter1 = std::make_shared<VSCConverter>(converterDyn1->getID(), converterDyn1->getBusInterface()->getID(), nullptr, voltageRegulationOn,
@@ -302,7 +302,7 @@ void NetworkManager::buildTree() {
if (voltageRegulationOn) {
updateMapRegulatingBuses(mapBusIdToNumberOfRegulation_, nodes_[converterDyn1->getBusInterface()->getID()]);
}
auto vscConverterDyn2 = boost::dynamic_pointer_cast<DYN::VscConverterInterface>(converterDyn2);
auto vscConverterDyn2 = std::dynamic_pointer_cast<DYN::VscConverterInterface>(converterDyn2);
updateConditioningStatus(vscConverterDyn2);
voltageRegulationOn = vscConverterDyn2->getVoltageRegulatorOn();
converter2 = std::make_shared<VSCConverter>(converterDyn2->getID(), converterDyn2->getBusInterface()->getID(), nullptr, voltageRegulationOn,
@@ -313,12 +313,12 @@ void NetworkManager::buildTree() {
}
} else {
converterType = HvdcLine::ConverterType::LCC;
auto lccConverterDyn1 = boost::dynamic_pointer_cast<DYN::LccConverterInterface>(converterDyn1);
auto lccConverterDyn1 = std::dynamic_pointer_cast<DYN::LccConverterInterface>(converterDyn1);
updateConditioningStatus(lccConverterDyn1);
converter1 =
std::make_shared<LCCConverter>(converterDyn1->getID(), converterDyn1->getBusInterface()->getID(), nullptr, lccConverterDyn1->getPowerFactor());

auto lccConverterDyn2 = boost::dynamic_pointer_cast<DYN::LccConverterInterface>(converterDyn2);
auto lccConverterDyn2 = std::dynamic_pointer_cast<DYN::LccConverterInterface>(converterDyn2);
updateConditioningStatus(lccConverterDyn2);
converter2 =
std::make_shared<LCCConverter>(converterDyn2->getID(), converterDyn2->getBusInterface()->getID(), nullptr, lccConverterDyn2->getPowerFactor());
2 changes: 1 addition & 1 deletion tests/algo/TestAlgoDynModel.cpp
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ class TestAlgoServiceManagerInterface : public DYN::ServiceManagerInterface {
/**
* @copydoc DYN::ServiceManagerInterface::getRegulatedBus
*/
boost::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return boost::shared_ptr<DYN::BusInterface>(); }
std::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return std::shared_ptr<DYN::BusInterface>(); }

private:
std::unordered_set<std::string> disconnectedNodes_;
2 changes: 1 addition & 1 deletion tests/algo/TestGeneratorsAlgo.cpp
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ class TestAlgoServiceManagerInterface : public DYN::ServiceManagerInterface {
/**
* @copydoc DYN::ServiceManagerInterface::getRegulatedBus
*/
boost::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return boost::shared_ptr<DYN::BusInterface>(); }
std::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return std::shared_ptr<DYN::BusInterface>(); }

private:
void updateSet(std::set<std::string> &set, const std::string &str, const std::string &vlid) const {
2 changes: 1 addition & 1 deletion tests/algo/TestHvdcLineAlgo.cpp
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ class TestAlgoServiceManagerInterface : public DYN::ServiceManagerInterface {
/**
* @copydoc DYN::ServiceManagerInterface::getRegulatedBus
*/
boost::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return boost::shared_ptr<DYN::BusInterface>(); }
std::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string &regulatingComponent) const final { return std::shared_ptr<DYN::BusInterface>(); }

private:
void updateSet(std::set<std::string> &set, const std::string &str, const std::string &vlid) const {
4 changes: 2 additions & 2 deletions tests/algo/TestSlackNodeAlgo.cpp
Original file line number Diff line number Diff line change
@@ -70,8 +70,8 @@ class TestAlgoServiceManagerInterface : public DYN::ServiceManagerInterface {
/**
* @copydoc DYN::ServiceManagerInterface::getRegulatedBus
*/
boost::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string& regulatingComponent) const final {
return boost::shared_ptr<DYN::BusInterface>();
std::shared_ptr<DYN::BusInterface> getRegulatedBus(const std::string& regulatingComponent) const final {
return std::shared_ptr<DYN::BusInterface>();
}

private:

0 comments on commit 234cd4b

Please sign in to comment.