Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
b4ce6808
Commit
b4ce6808
authored
Jan 14, 2020
by
Felix Wege
Browse files
added setParameters function and new constructor
Former-commit-id:
ab23bcf6
parent
a70ae26e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dependencies/libcps/Include/cps/DP/DP_Ph1_RXLoad.h
View file @
b4ce6808
...
...
@@ -86,6 +86,8 @@ namespace Ph1 {
void
initialize
(
Matrix
frequencies
);
/// Initializes component from power flow data
void
initializeFromPowerflow
(
Real
frequency
);
/// Sets model specific parameters
void
setParameters
(
Real
activePower
,
Real
ReactivePower
,
Real
volt
);
// #### MNA section ####
/// Initializes internal variables of the component
...
...
Dependencies/libcps/Source/DP/DP_Ph1_RXLoad.cpp
View file @
b4ce6808
...
...
@@ -50,8 +50,12 @@ DP::Ph1::RXLoad::RXLoad(String name,
}
PowerComponent
<
Complex
>::
Ptr
DP
::
Ph1
::
RXLoad
::
clone
(
String
name
)
{
// TODO: Is this change is needed when "everything set by initializePOwerflow"??
// everything set by initializeFromPowerflow
return
RXLoad
::
make
(
name
,
mLogLevel
);
//return RXLoad::make(name, mLogLevel);
auto
copy
=
RXLoad
::
make
(
name
,
mLogLevel
);
copy
->
setParameters
(
mActivePower
,
mReactivePower
,
mNomVoltage
);
return
copy
;
}
void
DP
::
Ph1
::
RXLoad
::
initialize
(
Matrix
frequencies
)
{
...
...
@@ -113,6 +117,14 @@ void DP::Ph1::RXLoad::initializeFromPowerflow(Real frequency) {
Logger
::
phasorToString
(
initialSingleVoltage
(
0
)));
}
void
DP
::
Ph1
::
RXLoad
::
setParameters
(
Real
activePower
,
Real
reactivePower
,
Real
volt
){
mActivePower
=
activePower
;
mReactivePower
=
reactivePower
;
mPower
=
{
mActivePower
,
mReactivePower
};
mNomVoltage
=
volt
;
}
void
DP
::
Ph1
::
RXLoad
::
mnaInitialize
(
Real
omega
,
Real
timeStep
,
Attribute
<
Matrix
>::
Ptr
leftVector
)
{
MNAInterface
::
mnaInitialize
(
omega
,
timeStep
);
updateSimNodes
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment