Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ITCPG.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Stuermer
ITCPG.jl
Commits
72678f50
Commit
72678f50
authored
4 years ago
by
Julian Stürmer
Browse files
Options
Downloads
Patches
Plain Diff
Change default Ipopt print_level to 5 in AC and DC calculations
parent
d7421794
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PowerFlow.jl
+10
-6
10 additions, 6 deletions
src/PowerFlow.jl
with
10 additions
and
6 deletions
src/PowerFlow.jl
+
10
−
6
View file @
72678f50
...
@@ -40,9 +40,9 @@ function calc_init_op(file::String; model=:ac)
...
@@ -40,9 +40,9 @@ function calc_init_op(file::String; model=:ac)
### Calculate power flow for chosen model
### Calculate power flow for chosen model
if
model
==
:
dc
if
model
==
:
dc
calc_dc_pf!
(
network_data
)
# calculate
DC-PF solution and add it to NDD
calc_dc_pf!
(
network_data
)
# calculate
and add DC-PF
elseif
model
==
:
ac
elseif
model
==
:
ac
calc_ac_pf!
(
network_data
)
# calculate
AC-PF solution and add it to NDD
calc_ac_pf!
(
network_data
)
# calculate
and add AC-PF
else
else
throw
(
ArgumentError
(
"Unknown model
$
model."
))
throw
(
ArgumentError
(
"Unknown model
$
model."
))
end
end
...
@@ -58,7 +58,7 @@ CAUTION: Overwrites any previous AC solution contained in the NDD!
...
@@ -58,7 +58,7 @@ CAUTION: Overwrites any previous AC solution contained in the NDD!
function
calc_ac_pf!
(
function
calc_ac_pf!
(
network_data
::
Dict
{
String
,
<:
Any
},
network_data
::
Dict
{
String
,
<:
Any
},
method
=
:
JuMP
;
method
=
:
JuMP
;
print_level
=
0
print_level
=
5
)
)
if
method
==
:
JuMP
# calculate AC-PF solution using a JuMP model
if
method
==
:
JuMP
# calculate AC-PF solution using a JuMP model
...
@@ -84,14 +84,18 @@ end
...
@@ -84,14 +84,18 @@ end
Calculates the DC power flow solution for the given NDD and updates it in the NDD.
Calculates the DC power flow solution for the given NDD and updates it in the NDD.
CAUTION: Overwrites any previous DC solution contained in the NDD!
CAUTION: Overwrites any previous DC solution contained in the NDD!
=#
=#
function
calc_dc_pf!
(
network_data
::
Dict
{
String
,
<:
Any
})
function
calc_dc_pf!
(
network_data
::
Dict
{
String
,
<:
Any
}
;
print_level
=
5
)
### Calculate AC-PF solution using PowerModels.jl and Ipopt
### Calculate AC-PF solution using PowerModels.jl and Ipopt
pf_result
=
run_dc_pf
(
pf_result
=
run_dc_pf
(
network_data
,
network_data
,
optimizer_with_attributes
(
Ipopt
.
Optimizer
,
"print_level"
=>
0
)
optimizer_with_attributes
(
Ipopt
.
Optimizer
,
"print_level"
=>
print_level
)
)
)
update_pf_data!
(
network_data
,
pf_result
,
model
=:
dc
)
# update PF in NDD
update_pf_data!
(
network_data
,
pf_result
,
model
=:
dc
)
# update PF in NDD
return
n
etwork_data
return
n
othing
end
end
#=
#=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment