Code Monkey home page Code Monkey logo

gaspowermodels.jl's People

Contributors

ccoffrin avatar juliatagbot avatar rb004f avatar tasseff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gaspowermodels.jl's Issues

Gas flow in parallel pipelines

Hi,

I am trying to replicate the power gas model (belgium gas with IEEE14 bus) in python following the formulation in Convex Optimization for Joint Expansion Planning of Natural Gas and Power Systems. I ran into an issues with gas flow in parallel pipelines. I wonder if you have encountered the same issue. My model gave a very similar results for the gas flow as the gaspowermodel julia package. The only issue is that only one pipe has gas flow among parallel pipelines. For example, pipeline 1 and pipeline 2 are parallel pipelines that connect junction 1 and junction 2. The gas flow of pipeline 1 in my model is the sum of the gas flow of pipeline1 and pipeline 2 in the julia package model. I wonder whether this is an issue with the second order cone relaxation. Because equation 17 in the paper is greater or equal to, the flow can be 0 in pipeline2, which satisfies the weymouth equation. Meanwhile, the gas mass flow balance is met through pipeline1's transportation of gas. I have already set the binary flow direction variables of parallel pipelines to be the same. May I ask whether you have encountered the same issue and whether there is a fix? A picture of comparison of flow variables are attached? Thanks very much for your help.
image

Constraint_heat_rate_curve

This constraint looks for ql values at the junction level. Needs to be refactored to be at the consumer level. Input data files will need to be adjusted as well.

Fix variable

Hi,

May I ask if there is a way to fix a variable when run the gas power model? For example, the active power and reactive power flow on transmission line connecting node 6 to node 13 are fixed at 0. Thanks.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

PowerModels 0.6

Refactor data files to conform to PowerModels 0.6 data models that split load from buses

parse routines

Create GasPowerModels parse routines which handle all the per unit/data correction routines in one place. Leverage the data correction and parse routines of GasModels and PowerModels

Update wiki documentation

The wiki documentation leaves much to be desired in terms of clarity on how the data model captures the coupling between gas and electric power systems

objective function unification

Consider unifying the objectives (and problem formulations) min_ne, min_opf, and min_ne_opf as a single function. min_ne is min_ne_opf without opf and min_opf is min_ne_opf without ne. With 0 cost provided as inputs, min_ne_opf could be used to model all three examples. Is there value in modeling these three problems independently?

PowerModels Versions

What versions of PowerModels is this code compatible with? The REQUIRE says,

PowerModels 0.5

Which would suggest versions 0.5 and 0.6. However, providing an upper bound is the best practice to prevent this code from breaking when a new version is released. For example,

PowerModels 0.5 0.7-

would explicitly state that it is compatible with versions 0.5 and 0.6.

Error during testing.

Hi,

I followed the instruction to add the command (Pkg.add("GasPowerModels") and add JuMP Juniper Ipopt Cbc). Then I run the testing. But it gave me error as below. Thanks for your help.

[ Info: no explicit NLP constraints or objective provided using @NLconstraint or @NLobjective macros
IEEE 14 Belgian case: Error During Test at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/gpf.jl:15
Got exception outside of a @test
could not load library "/Users/carriesu/.julia/packages/Ipopt/Iu7vT/deps/usr/lib/libipopt.1.10.10.dylib"
dlopen(/Users/carriesu/.julia/packages/Ipopt/Iu7vT/deps/usr/lib/libipopt.1.10.10.dylib, 1): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /Users/carriesu/.julia/packages/Ipopt/Iu7vT/deps/usr/lib/libipopt.1.10.10.dylib
Reason: image not found
Stacktrace:
[1] createProblem(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, ::Int64, ::Ipopt.var"#eval_f_cb#18"{Ipopt.Optimizer}, ::Ipopt.var"#eval_g_cb#20"{Ipopt.Optimizer}, ::Ipopt.var"#eval_grad_f_cb#19"{Ipopt.Optimizer}, ::Ipopt.var"#eval_jac_g_cb#21"{Ipopt.Optimizer,Array{Tuple{Int64,Int64},1}}, ::Ipopt.var"#eval_h_cb#22"{Ipopt.Optimizer,Array{Tuple{Int64,Int64},1}}) at /Users/carriesu/.julia/packages/Ipopt/Iu7vT/src/Ipopt.jl:224
[2] optimize!(::Ipopt.Optimizer) at /Users/carriesu/.julia/packages/Ipopt/Iu7vT/src/MOI_wrapper.jl:684
[3] optimize!(::MathOptInterface.Utilities.CachingOptimizer{Ipopt.Optimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}) at /Users/carriesu/.julia/packages/MathOptInterface/C3lip/src/Utilities/cachingoptimizer.jl:170
[4] optimize!(::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{Ipopt.Optimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}},MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Bridges.AllBridgedConstraints{Float64}}}) at /Users/carriesu/.julia/packages/MathOptInterface/C3lip/src/Bridges/bridgeoptimizer.jl:73
[5] optimize!(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}) at /Users/carriesu/.julia/packages/MathOptInterface/C3lip/src/Utilities/cachingoptimizer.jl:170
[6] optimize!(::Model, ::OptimizerFactory; bridge_constraints::Bool, ignore_optimize_hook::Bool) at /Users/carriesu/.julia/packages/JuMP/ibcEh/src/optimizer_interface.jl:132
[7] optimize! at /Users/carriesu/.julia/packages/JuMP/ibcEh/src/optimizer_interface.jl:105 [inlined]
[8] optimize_get_status_backend(::Model; solver::OptimizerFactory) at /Users/carriesu/.julia/packages/Juniper/N3gty/src/util.jl:271
[9] solve_root_model!(::Juniper.JuniperProblem) at /Users/carriesu/.julia/packages/Juniper/N3gty/src/model.jl:63
[10] optimize!(::Juniper.Optimizer) at /Users/carriesu/.julia/packages/Juniper/N3gty/src/MOI_wrapper/MOI_wrapper.jl:285
[11] optimize!(::MathOptInterface.Bridges.LazyBridgeOptimizer{Juniper.Optimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Bridges.AllBridgedConstraints{Float64}}}) at /Users/carriesu/.julia/packages/MathOptInterface/C3lip/src/Bridges/bridgeoptimizer.jl:73
[12] optimize!(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}) at /Users/carriesu/.julia/packages/MathOptInterface/C3lip/src/Utilities/cachingoptimizer.jl:170
[13] optimize!(::Model, ::OptimizerFactory; bridge_constraints::Bool, ignore_optimize_hook::Bool) at /Users/carriesu/.julia/packages/JuMP/ibcEh/src/optimizer_interface.jl:132
[14] optimize! at /Users/carriesu/.julia/packages/JuMP/ibcEh/src/optimizer_interface.jl:105 [inlined]
[15] macro expansion at ./timing.jl:310 [inlined]
[16] optimize!(::GenericPowerModel{SOCWRForm}, ::GenericGasModel{StandardMISOCPForm}, ::OptimizerFactory) at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/core/base.jl:72
[17] solve_generic_model(::GenericPowerModel{SOCWRForm}, ::GenericGasModel{StandardMISOCPForm}, ::OptimizerFactory; solution_builder::Function) at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/core/base.jl:63
[18] run_generic_model(::Dict{String,Any}, ::Dict{String,Any}, ::Type{T} where T, ::Type{T} where T, ::OptimizerFactory, ::typeof(GasPowerModels.post_gpf); power_ref_extensions::Array{Any,1}, solution_builder::Function, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/core/base.jl:29
[19] run_generic_model(::String, ::String, ::Type{T} where T, ::Type{T} where T, ::OptimizerFactory, ::typeof(GasPowerModels.post_gpf); solution_builder::Function, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/core/base.jl:23
[20] run_generic_model at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/core/base.jl:21 [inlined]
[21] #run_gpf#26 at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/prob/gpf.jl:7 [inlined]
[22] run_gpf(::String, ::String, ::Type{T} where T, ::Type{T} where T, ::OptimizerFactory) at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/src/prob/gpf.jl:7
[23] top-level scope at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/gpf.jl:16
[24] top-level scope at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[25] top-level scope at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/gpf.jl:16
[26] top-level scope at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
[27] top-level scope at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/gpf.jl:15
[28] include(::String) at ./client.jl:457
[29] top-level scope at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/runtests.jl:42
[30] include(::String) at ./client.jl:457
[31] top-level scope at none:6
[32] eval(::Module, ::Any) at ./boot.jl:331
[33] exec_options(::Base.JLOptions) at ./client.jl:272
[34] _start() at ./client.jl:506

Test Summary: | Error Total
test qp gf pf | 1 1
IEEE 14 Belgian case | 1 1
ERROR: LoadError: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/gpf.jl:14
in expression starting at /Users/carriesu/.julia/packages/GasPowerModels/aycKw/test/runtests.jl:42
ERROR: Package GasPowerModels errored during testing

Incompitable packages

Dear Sir,

Recently I installed the GasPowerModels package in Julia. Then I tried to add the Pavito solver. It was unsuccessful. It seems that the JuMP versions compatible with Pavito are different from those with GasModels. Without the Pavito solver, GasPowerModels cannot run. Could you please give me some advice on this issue?

The GasPowerModels is really a powerful tool to model the gas and power coupling scenarios. Many thanks for your sharing.

Sincerely yours,
Sean
——————————————————————————

julia> Pkg.add("Pavito")
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
JuMP [4076af6c] log:
├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.2] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.2]
├─restricted by compatibility requirements with GasModels [5e113713] to versions: 0.19.1-0.19.2
│ └─GasModels [5e113713] log:
│ ├─possible versions are: [0.3.0, 0.3.2-0.3.5, 0.4.0-0.4.1, 0.5.0, 0.6.0] or uninstalled
│ ├─restricted to versions * by an explicit requirement, leaving only versions [0.3.0, 0.3.2-0.3.5, 0.4.0-0.4.1, 0.5.0, 0.6.0]
│ └─restricted by compatibility requirements with GasPowerModels [1fcaf345] to versions: 0.4.0-0.4.1
│ └─GasPowerModels [1fcaf345] log:
│ ├─possible versions are: 0.1.0-0.1.1 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.1
└─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
└─Pavito [cd433a01] log:
├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

nefd problem

The nefd problem should be eliminated as it can be replaced with the new forms that assume fixed direction.

Status propogation

We need an implementation of status propagation between infrastructure systems. For example, if a PowerModels generator status = 0, PowerModels will remove the generator from ref. However, a GasModels receipt point might point at that generator as a consumer of gas. Given that the generator is removed, this will result in a dangling data pointer. So, we need to make this receipt status = 0 as well. This might require manual execution of the correct_network functions in GasModels and PowerModels

Solvers for Testing

See if requirements for AmplNLWriter and CoinOptServices can be eliminated by using native Julia solvers.

Include objective weighting and normalization data in PowerModels input

Currently, parameters related to the definition of an objective function (e.g., gas_ne_weight, power_ne_weight, and obj_normalization) are passed in via kwargs. These should instead be migrated to the corresponding PowerModels input file as global parameters. This should be done for all relevant test cases.

InfrastructureModels Conventions Maintenance

  • update to PowerModels v0.14
  • drop Manifest.toml from git and add to .gitignore
  • add "ResultCount" check in build_solution, otherwise JuMP.value() can fail (see PowerModels fix, lanl-ansi/PowerModels.jl@b80f4fe)
  • remove JuMP.optimize!, and merge code into optimize_model!
  • in optimize_model! make optimizer an optional kwarg (see, lanl-ansi/PowerModels.jl@8a8c9c0)
  • update core function names, build_model -> instantiate_model; build_solution -> build_result
  • update post_* functions to build_*
  • follow problem naming convention post_(mn_)<prob name>(_<variant>)*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.