Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@
# Security, LLC, and shall not be used for advertising or product
# endorsement purposes.
#

#
# [[
# Author(s):
# - Cameron Rutherford <cameron.rutherford@pnnl.gov>
#]]
# - Slaven Peles <peless@ornl.gov>
# ]]

cmake_minimum_required(VERSION 3.12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ModelLib {


/*!
* @brief Constructor for a Discrete Generator
* @brief Constructor for a Distributed Generator
* @todo Maybe have parameters be templated in. Variables cannot be changed and are unlikely to. Allows for compile time optimizations
*
* Calls default ModelEvaluatorImpl constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ namespace ModelLib {
*
* In DQ space
* Each microgrid line has a virtual resistance RN
* Model is from paper: "
"Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid" Nagaraju Pogaku, Milan Prodanovic, and Timothy C. Green"
* Section E
* Model is from paper: "Modeling, Analysis and Testing of Autonomous Operation
* of an Inverter-Based Microgrid", Nagaraju Pogaku, Milan Prodanovic, and
* Timothy C. Green, Section E
*/

template <class ScalarT, typename IdxT>
MicrogridBusDQ<ScalarT, IdxT>::MicrogridBusDQ(IdxT id, ScalarT RN)
: RN_(RN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace ModelLib {
* Calls default ModelEvaluatorImpl constructor.
*
*
* Model is from paper: "
"Modeling, Analysis and Testing of Autonomous Operation of an Inverter-Based Microgrid" Nagaraju Pogaku, Milan Prodanovic, and Timothy C. Green"
* Section C
* Model is from paper: "Modeling, Analysis and Testing of Autonomous Operation
* of an Inverter-Based Microgrid", Nagaraju Pogaku, Milan Prodanovic, and
* Timothy C. Green, Section C
*
* @todo Consider having \omegaref as a global constant, not a node variable.
*/
Expand Down Expand Up @@ -88,7 +88,7 @@ int MicrogridLine<ScalarT, IdxT>::evaluateResidual()
f_[4] = y_[6] ;

//Internal variables
f_[5] = -yp_[5] - (R_ / L_) * y_[5] + y_[0]*y_[6] + (y_[1] - y_[3])/L_;
f_[5] = -yp_[5] - (R_ / L_) * y_[5] + y_[0]*y_[6] + (y_[1] - y_[3])/L_;
f_[6] = -yp_[6] - (R_ / L_) * y_[6] - y_[0]*y_[5] + (y_[2] - y_[4])/L_;


Expand Down Expand Up @@ -166,8 +166,6 @@ int MicrogridLine<ScalarT, IdxT>::evaluateAdjointIntegrand()





// Available template instantiations
template class MicrogridLine<double, long int>;
template class MicrogridLine<double, size_t>;
Expand Down
5 changes: 3 additions & 2 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
#

add_subdirectory(MatPowerTesting)
add_subdirectory(RLCircuit)
add_subdirectory(Microgrid)
add_subdirectory(SparseTest)
add_subdirectory(DistributedGeneratorTest)

Expand All @@ -67,6 +65,9 @@ endif()

if(TARGET SUNDIALS::idas)
add_subdirectory(AdjointSensitivity)
add_subdirectory(RLCircuit)
add_subdirectory(Microgrid)
add_subdirectory(ScaleMicrogrid)
if(GRIDKIT_ENABLE_IPOPT)
add_subdirectory(DynamicConstrainedOpt)
add_subdirectory(GenConstLoad)
Expand Down
13 changes: 13 additions & 0 deletions Examples/ScaleMicrogrid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@




add_executable(scalemicrogrid ScaleMicrogrid.cpp)
target_link_libraries(scalemicrogrid GRIDKIT::powerelec_disgen
GRIDKIT::powerelec_mircoline
GRIDKIT::powerelec_microload
GRIDKIT::solvers_dyn
GRIDKIT::powerelec_mircobusdq)

add_test(NAME ScaleMicrogrid COMMAND $<TARGET_FILE:scalemicrogrid>)
install(TARGETS scalemicrogrid RUNTIME DESTINATION bin)
Loading