Skip to content

Commit

Permalink
#798 Update following DYN-2455
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim committed Oct 24, 2024
1 parent f4a1215 commit 5ed90db
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions sources/Inputs/src/NetworkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <DYNTwoWTransformerInterface.h>
#include <DYNVoltageLevelInterface.h>
#include <DYNVscConverterInterface.h>
#include <boost/make_shared.hpp>


namespace dfl {
namespace inputs {
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion tests/algo/TestAlgoDynModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
2 changes: 1 addition & 1 deletion tests/algo/TestGeneratorsAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/algo/TestHvdcLineAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions tests/algo/TestSlackNodeAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5ed90db

Please sign in to comment.