Skip to content

Commit fe2b67b

Browse files
committed
Use BusData with BusInfinite.
1 parent e56d5e5 commit fe2b67b

3 files changed

Lines changed: 8 additions & 49 deletions

File tree

src/Model/PhasorDynamics/Bus/BusInfinite.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <cmath>
55
#include <iostream>
66

7-
#include <Model/PowerFlow/PowerSystemData.hpp>
7+
#include <Model/PhasorDynamics/Bus/BusData.hpp>
88

99
namespace GridKit
1010
{
@@ -66,10 +66,10 @@ namespace GridKit
6666
* @param[in] data - structure with bus data
6767
*/
6868
template <class ScalarT, typename IdxT>
69-
BusInfinite<ScalarT, IdxT>::BusInfinite(BusData& data)
70-
: BusBase<ScalarT, IdxT>(data.bus_i),
71-
Vr_(data.Vm * cos(data.Va)),
72-
Vi_(data.Vm * sin(data.Va))
69+
BusInfinite<ScalarT, IdxT>::BusInfinite(DataT& data)
70+
: BusBase<ScalarT, IdxT>(data.bus_id),
71+
Vr_(data.Vr0),
72+
Vi_(data.Vi0)
7373
{
7474
size_ = 0;
7575
}

src/Model/PhasorDynamics/Bus/BusInfinite.hpp

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Forward declaration of BusData structure
77
namespace GridKit
88
{
9-
namespace PowerSystemData
9+
namespace PhasorDynamics
1010
{
1111
template <typename RealT, typename IdxT>
1212
struct BusData;
@@ -37,11 +37,11 @@ namespace GridKit
3737

3838
public:
3939
using real_type = typename BusBase<ScalarT, IdxT>::real_type;
40-
using BusData = GridKit::PowerSystemData::BusData<real_type, IdxT>;
40+
using DataT = BusData<real_type, IdxT>;
4141

4242
BusInfinite();
4343
BusInfinite(ScalarT Vr, ScalarT Vi);
44-
BusInfinite(BusData& data);
44+
BusInfinite(DataT& data);
4545
virtual ~BusInfinite();
4646

4747
virtual int allocate() override;
@@ -99,46 +99,6 @@ namespace GridKit
9999
return Ii_;
100100
}
101101

102-
// virtual ScalarT& VrB() override
103-
// {
104-
// return VrB_;
105-
// }
106-
107-
// virtual const ScalarT& VrB() const override
108-
// {
109-
// return VrB_;
110-
// }
111-
112-
// virtual ScalarT& ViB() override
113-
// {
114-
// return ViB_;
115-
// }
116-
117-
// virtual const ScalarT& ViB() const override
118-
// {
119-
// return ViB_;
120-
// }
121-
122-
// virtual ScalarT& IrB() override
123-
// {
124-
// return IrB_;
125-
// }
126-
127-
// virtual const ScalarT& IrB() const override
128-
// {
129-
// return IrB_;
130-
// }
131-
132-
// virtual ScalarT& IiB() override
133-
// {
134-
// return IiB_;
135-
// }
136-
137-
// virtual const ScalarT& IiB() const override
138-
// {
139-
// return IiB_;
140-
// }
141-
142102
private:
143103
ScalarT Vr_{0.0};
144104
ScalarT Vi_{0.0};

src/Model/PhasorDynamics/BusFault/BusFault.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <iostream>
1414

1515
#include <Model/PhasorDynamics/Bus/Bus.hpp>
16-
#include <Model/PowerFlow/PowerSystemData.hpp>
1716

1817
namespace GridKit
1918
{

0 commit comments

Comments
 (0)