Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tp_pf voltage magnitude bound #125

Closed
sanderclaeys opened this issue Apr 18, 2019 · 10 comments
Closed

tp_pf voltage magnitude bound #125

sanderclaeys opened this issue Apr 18, 2019 · 10 comments
Labels
Type: Bug Something isn't working

Comments

@sanderclaeys
Copy link
Contributor

sanderclaeys commented Apr 18, 2019

In the tp_pf problem formulation, the following constraint should be removed:
https://github.com/lanl-ansi/ThreePhasePowerModels.jl/blob/8abe80da4880382bc5fedaee2dab8e751bdd9733/src/prob/tp_pf.jl#L39
The purpose of this constraint is to enforce the voltage magnitude bounds in the ACR formulation as a SOC constraint. It is empty for the ACP formulation.

It should not be present in the power flow problem. I ran into this issue when debugging the load models.

@ccoffrin
Copy link
Member

I disagree. Here is an example of a non-convex problem that requires it, https://github.com/lanl-ansi/PowerModels.jl/blob/master/src/form/act.jl#L15. Obscure, but worth further exploration.

@ccoffrin
Copy link
Member

If a specific formulation does not require it, just make an empty function like so, https://github.com/lanl-ansi/PowerModels.jl/blob/master/src/form/acp.jl#L14

@frederikgeth
Copy link
Collaborator

Ah, ok, I think we may be mixing up two things.

The purpose of constraint_voltage is to define KVL over all loops in a meshed network, and thereby reflect the part of the power flow physics that isn't captured by Ohm's law and the conservation of current.

However, for the ACR formulation, this constraint is actuallt used to apply bounds on the voltage magnitude, so voltage magnitude bounds are used, even when solving a power flow (even in PowerModels proper, I think).

The use of constraint_voltage for this purpose seems consistent with the first use case.

@ccoffrin
Copy link
Member

Oh, I think we are having some confusion due to my lack of documentation.

My intended semantics for constraint_voltage is for constraints that link multiple voltage variables. For example the bounds in ACR or voltage-based inequalities in the relaxations. If you wish to do KVL, then I would add new constraint (e.g. constraint_kvl(...)) which takes a collection of ordered bus ids which define a cycle in the network graph.

@sanderclaeys
Copy link
Contributor Author

I see. In that case, shouldn't there be a keyword argument 'bounded=false' which deactivates the bound setting for the ACR case?
Because right now, for the power flow problem formulation, vm>0.9 is enforced for the ACR case, but not the ACP case.

@ccoffrin
Copy link
Member

Yes! That is a bug in the current PF formulation.

@frederikgeth frederikgeth added the Type: Bug Something isn't working label Apr 22, 2019
@ccoffrin
Copy link
Member

ccoffrin commented May 1, 2019

We need an issue or PR on PowerModels to fix this.

pseudocubic pushed a commit that referenced this issue Jun 25, 2019
* emptied dss2tppm_trans

* emptied dss2tppm_trans

* adjust_vbase

Initial work on adjusting the voltage base throughout the network

* basic transformer parsing

converts dss transformer into intermediate (composed) internal transformer model

* transformer decomposition

decompose complex transformer into simple ones

* parser fix

vbranch method, base fix,…

* working version

* Updated docs

* add math models

* voltages linked for acp, wr removed

* update unit tests

the previous bug would now cause a test to fail

* extended tp_pf

* reactance fix

* unit test loss model

* impzero reduction

* roll back impzero

* parser update

* math rewrite

* sourcegen bounds fix

* sourcegen bounds fix

* Add warnings

* small fixes + cmatrix correction

* added new unit tests

* fix for per winding rs spec

* test updates

* source_id added

* clean up

* clean up

* clean up

* separate flow for fix and var

* clean up

* renamed tp_trans.jl

* adjust_base unit test

* minor fixes

* active_phases warning

* docstrings + spacing

* update changelog

* Typo

* minor fix

* FIX: kwargs type fix

In Julia v0.6, kwargs are arrays and not dicts, causing CI tests to fail. Fixes this with `kwargs = Dict{Symbol,Any}(kwargs)`

* minor fixes

* delta pq

* Validated

* trans KCL for acr, wr and dcp

* unit test workaround

* minor fix

* va_start from variable to constraint

* working version

* unit test added

* unit test lm acr pf

* acr support

* docstrings added

* test opendss.jl fix

* minor fixes

* oltc prob added

* pt and qt

* refactor constraints

* pm to jump calls

* conductor check

* missing dss files

* refactoring

* removed loose bounds

* ref update

* constraint_tp_voltage fix

* constraint_tp_voltage socwr fix

* removed set_tp_va_start_if_unset

* UPD: constraint.jl

* UPD: constraint_template.jl

* UPD: variable.jl

* UPD: acp.jl

* UPD: acp.jl

* UPD: opendss.jl

* UPD: tp_pf_lm.jl

* UPD: acr.jl

* FIX: missing `PMs.`

* FIX: missing `JuMP.`

* FIX: missing `PMs.`

* FIX: missing `PMs.`

* FIX: missing `PMs.`

* FIX: missing `PMs.`

* tests added

* probs docs + off

* probs docs + opf

* rm workaround issue #125

* start at slack

* new unit test with ampler solver

* vbase starts at sources

* loadmodels v2

* added ampl to toml for Travis

* added ampl uuid

* Rm redundant tests

* ampl removed

* jump dep

* UPD: Manifest.toml

* FIX: Memento messages leaking into test log

* small changes

* typo

* UPD: Change log

[skip ci]
@pseudocubic
Copy link
Collaborator

@ccoffrin was this fixed in PowerModels v0.12?

@pseudocubic
Copy link
Collaborator

@sanderclaeys @ccoffrin was this issue resolved?

@ccoffrin
Copy link
Member

ccoffrin commented Sep 4, 2019

Yes, it was here lanl-ansi/PowerModels.jl#498.

@ccoffrin ccoffrin closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants