DPsim
PFSolverInterfaceBus.h
1 /* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2  * EONERC, RWTH Aachen University
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7  *********************************************************************************/
8 
9 #pragma once
10 
11 #include <dpsim-models/AttributeList.h>
12 #include <dpsim-models/Config.h>
13 #include <dpsim-models/Definitions.h>
14 #include <dpsim-models/Logger.h>
15 #include <dpsim-models/MathUtils.h>
16 #include <dpsim-models/PtrFactory.h>
17 #include <dpsim-models/SP/SP_Ph1_PQNode.h>
18 #include <dpsim-models/SP/SP_Ph1_PVNode.h>
19 #include <dpsim-models/SP/SP_Ph1_VDNode.h>
20 #include <dpsim-models/SimNode.h>
21 #include <dpsim-models/SimTerminal.h>
22 #include <dpsim-models/Task.h>
23 
24 namespace CPS {
27 protected:
28  Task::List mPFTasks;
29 
30 public:
31  typedef std::shared_ptr<PFSolverInterfaceBus> Ptr;
32  typedef std::vector<Ptr> List;
33 
34  std::shared_ptr<CPS::SP::Ph1::PQNode> mPQ;
35  std::shared_ptr<CPS::SP::Ph1::PVNode> mPV;
36  std::shared_ptr<CPS::SP::Ph1::VDNode> mVD;
37 
39  PowerflowBusType mPowerflowBusType;
40  PFSolverInterfaceBus() = default;
41 
42  virtual void modifyPowerFlowBusType(PowerflowBusType powerflowBusType) = 0;
43  virtual void pfBusInitialize() { mPFTasks.clear(); }
44  const Task::List &pfTasks() { return mPFTasks; }
45 };
46 
47 } // namespace CPS
Common base class of all Component templates.
PowerflowBusType mPowerflowBusType
Define the type of bus the component is modelled by.