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

v0.7.4 #13

Merged
merged 78 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f4da1f7
Add github actions
jinningwang Nov 4, 2023
aa84e98
Fix rouinte var values before solve
jinningwang Nov 4, 2023
f219328
Improve rparm and var __repr__
jinningwang Nov 4, 2023
9c28eea
Improve rparm and var __repr__
jinningwang Nov 4, 2023
1193424
Typo
jinningwang Nov 4, 2023
d832272
Typo
jinningwang Nov 4, 2023
535db81
Add property method to access constr value
jinningwang Nov 4, 2023
6f71e96
Add routine test of constr value
jinningwang Nov 4, 2023
6aa62f3
Refactor routine tests
jinningwang Nov 4, 2023
c79506e
Add mehotd graph to routine
jinningwang Nov 5, 2023
f469a02
Fix sparse matrix value
jinningwang Nov 5, 2023
1bb956f
Fix var __repr__
jinningwang Nov 5, 2023
689d0a1
Fix routine method graph with None input
jinningwang Nov 5, 2023
e84dac6
Add routine tests of graph
jinningwang Nov 5, 2023
d41c2cc
Refactor DCOPF
jinningwang Nov 5, 2023
d6b2c19
Refactor require_igraph
jinningwang Nov 5, 2023
b0f0a78
Minor refactor routine tests
jinningwang Nov 5, 2023
94d8e6d
Typo
jinningwang Nov 5, 2023
cf0b133
Revise versioninfo
jinningwang Nov 5, 2023
7c3fba1
Add more igraph parameters
jinningwang Nov 6, 2023
1a8ec74
Remove unnecessary extra dependencies
jinningwang Nov 6, 2023
d1ee567
Minor fix
jinningwang Nov 6, 2023
3259ff3
Typo
jinningwang Nov 6, 2023
0d315a5
Typo
jinningwang Nov 6, 2023
94328cc
Typo
jinningwang Nov 6, 2023
b252a65
Refactor routine tests
jinningwang Nov 6, 2023
d953c0f
Minor refactor on routine tests
jinningwang Nov 6, 2023
5b195ed
Add more tests into service test
jinningwang Nov 7, 2023
23b6565
Refactor RParam, Var, Constr __repr__
jinningwang Nov 8, 2023
94a485f
Change init default param
jinningwang Nov 8, 2023
4b882ed
Add two examples
jinningwang Nov 8, 2023
364723a
Add examples into doc index
jinningwang Nov 8, 2023
6e28676
Minor fix on RTED __repr__
jinningwang Nov 8, 2023
bb07dfd
Fix solver stats empty info
jinningwang Nov 8, 2023
804b08d
Add documenter support to gamma symbol
jinningwang Nov 8, 2023
4b85b49
Fix VarSelect
jinningwang Nov 9, 2023
4305710
Typo
jinningwang Nov 9, 2023
e949c7d
Fix property method shape
jinningwang Nov 9, 2023
e39bbe5
Fix routine tests
jinningwang Nov 9, 2023
7bb7141
Update RTD conf
jinningwang Nov 9, 2023
dc44d95
Ignore .conda in git
jinningwang Nov 9, 2023
d7a5b95
[WIP] Fix RTED2
jinningwang Nov 9, 2023
e971f78
Add alias for symprocessor
jinningwang Nov 13, 2023
7e5200c
Add registration of var boundary to omodel
jinningwang Nov 13, 2023
8ddb95b
[WIP] Fix ED
jinningwang Nov 13, 2023
bc1ab20
Refactor OModel Vars and Constrs setattr
jinningwang Nov 14, 2023
d57bf82
Refactor OModel to collect params
jinningwang Nov 14, 2023
ba5420e
Refactor routines to include parameter in OModel
jinningwang Nov 21, 2023
990a139
Refactor routines to include parameter in OModel
jinningwang Nov 21, 2023
fa1dc91
Change const as no_parse
jinningwang Nov 21, 2023
5ee4831
Deprecat Constant
jinningwang Nov 21, 2023
8d74295
Refactor parameter update
jinningwang Nov 21, 2023
191793b
Deprecate lb and ub in Var
jinningwang Nov 21, 2023
2cd36a6
Refactor DCOPF to include bus angle
jinningwang Nov 22, 2023
31c9592
Clean up DCOPF
jinningwang Nov 22, 2023
b34c9fa
Improve OModel error info
jinningwang Nov 23, 2023
69ac595
Refactor DCOPF
jinningwang Nov 23, 2023
d393007
Refactor RTED
jinningwang Nov 23, 2023
6c1d142
Refactor ED
jinningwang Nov 23, 2023
6a78b81
Improve logger msg
jinningwang Nov 24, 2023
736d8ef
Improve logger msg
jinningwang Nov 24, 2023
5465fc4
Refactor UC
jinningwang Nov 24, 2023
8931918
Refactor UC
jinningwang Nov 24, 2023
6b9e9a2
Refactor DOPF
jinningwang Nov 24, 2023
8a9e228
Rename routines
jinningwang Nov 24, 2023
029c921
Typo
jinningwang Nov 24, 2023
397e78f
Fix ACOPF
jinningwang Nov 28, 2023
6fee997
Fix tests
jinningwang Nov 28, 2023
d26ea03
[WIP] Clean up cases
jinningwang Nov 28, 2023
fa52ec3
Typo
Nov 28, 2023
246e6e3
Doc
Nov 28, 2023
55fea48
Fix pglb and pgub
Nov 29, 2023
9104f5b
Typo
Nov 29, 2023
47c1ae3
Fix cases
Nov 29, 2023
8d69ee8
Update examples
Nov 29, 2023
2613c05
Fix import Iterable
Nov 29, 2023
6a04783
Simplify API doc
Nov 29, 2023
dd4551a
Merge pull request #16 from jinningwang/plot
jinningwang Nov 29, 2023
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
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: cuihantao

---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Update data files and code for reproducing the error.

If you need to insert code inline, use a pair of triple backticks to format:

```python
Code goes here
```

**Expected behavior**

A clear and concise description of what you expected to happen.

**Desktop (please complete the following information):**

- OS: [e.g. Windows]
- AMS version (please paste the output from `ams misc --version`)


**pip packages (please paste the output from `pip list`)**


**Additional context**

Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees:

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Fixes #

## Proposed Changes

-
-
-

43 changes: 43 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python application

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
# work around a pip issue with extras_require: https://github.com/pypa/pip/issues/8323
python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"
python -m pip install --upgrade pip
python -m pip install .[all]
python -m pip install nbmake==0.10 pytest-xdist line_profiler # add'l packages for notebook tests.
# - name: Lint with flake8 for pull requests
# if: github.event_name == 'pull_request'
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 .
- name: Test with pytest
run: |
pytest --log-cli-level=10
# - name: Test notebooks.
# run: |
# pytest --log-cli-level=10 --nbmake examples --ignore=examples/verification
# - name: Build a distribution if tagged
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# run: |
# python setup.py sdist
# - name: Publish a Python distribution to PyPI if tagged
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ _generated
icebar

# example excel files cache
~$*.xlsx
~$*.xlsx

# conda
.conda/*
72 changes: 48 additions & 24 deletions ams/cases/5bus/pjm5bus_uced.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,145 +722,169 @@
"idx": "EDT1",
"u": 1.0,
"name": "EDT1",
"sd": "0.793,0.0"
"sd": "0.793,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT2",
"u": 1.0,
"name": "EDT2",
"sd": "0.756,0.0"
"sd": "0.756,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT3",
"u": 1.0,
"name": "EDT3",
"sd": "0.723,0.0"
"sd": "0.723,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT4",
"u": 1.0,
"name": "EDT4",
"sd": "0.708,0.0"
"sd": "0.708,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT5",
"u": 1.0,
"name": "EDT5",
"sd": "0.7,0.0"
"sd": "0.7,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT6",
"u": 1.0,
"name": "EDT6",
"sd": "0.706,0.0"
"sd": "0.706,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT7",
"u": 1.0,
"name": "EDT7",
"sd": "0.75,0.0"
"sd": "0.75,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT8",
"u": 1.0,
"name": "EDT8",
"sd": "0.802,0.0"
"sd": "0.802,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT9",
"u": 1.0,
"name": "EDT9",
"sd": "0.828,0.0"
"sd": "0.828,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT10",
"u": 1.0,
"name": "EDT10",
"sd": "0.851,0.0"
"sd": "0.851,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT11",
"u": 1.0,
"name": "EDT11",
"sd": "0.874,0.0"
"sd": "0.874,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT12",
"u": 1.0,
"name": "EDT12",
"sd": "0.898,0.0"
"sd": "0.898,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT13",
"u": 1.0,
"name": "EDT13",
"sd": "0.919,0.0"
"sd": "0.919,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT14",
"u": 1.0,
"name": "EDT14",
"sd": "0.947,0.0"
"sd": "0.947,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT15",
"u": 1.0,
"name": "EDT15",
"sd": "0.97,0.0"
"sd": "0.97,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT16",
"u": 1.0,
"name": "EDT16",
"sd": "0.987,0.0"
"sd": "0.987,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT17",
"u": 1.0,
"name": "EDT17",
"sd": "1.0,0.0"
"sd": "1.0,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT18",
"u": 1.0,
"name": "EDT18",
"sd": "1.0,0.0"
"sd": "1.0,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT19",
"u": 1.0,
"name": "EDT19",
"sd": "0.991,0.0"
"sd": "0.991,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT20",
"u": 1.0,
"name": "EDT20",
"sd": "0.956,0.0"
"sd": "0.956,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT21",
"u": 1.0,
"name": "EDT21",
"sd": "0.93,0.0"
"sd": "0.93,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT22",
"u": 1.0,
"name": "EDT22",
"sd": "0.905,0.0"
"sd": "0.905,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT23",
"u": 1.0,
"name": "EDT23",
"sd": "0.849,0.0"
"sd": "0.849,0.0",
"ug": "1,1,1,1"
},
{
"idx": "EDT24",
"u": 1.0,
"name": "EDT24",
"sd": "0.784,0.0"
"sd": "0.784,0.0",
"ug": "1,1,1,1"
}
],
"UCTSlot": [
Expand Down
Binary file modified ams/cases/5bus/pjm5bus_uced.xlsx
Binary file not shown.
Binary file added ams/cases/5bus/pjm5bus_uced_esd1.xlsx
Binary file not shown.
Binary file modified ams/cases/ieee123/ieee123_regcv1.xlsx
Binary file not shown.
Binary file modified ams/cases/ieee14/ieee14_uced.xlsx
Binary file not shown.
Binary file removed ams/cases/ieee39/ieee39_esd1.xlsx
Binary file not shown.
Binary file modified ams/cases/ieee39/ieee39_uced.xlsx
Binary file not shown.
Binary file modified ams/cases/ieee39/ieee39_uced_esd1.xlsx
Binary file not shown.
Binary file modified ams/cases/npcc/npcc_uced.xlsx
Binary file not shown.
Binary file modified ams/cases/wecc/wecc_uced.xlsx
Binary file not shown.
29 changes: 19 additions & 10 deletions ams/core/documenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,23 +498,32 @@ def _tex_pre(docm, p, tex_map):
"""

# NOTE: in the future, there might occur special math symbols
special_map = OrderedDict([
map_before = OrderedDict([
('sum', 'SUM'),
(r'\sum', 'SUM'),
(r'\eta', 'ETA'),
(r'\gamma', 'GAMMA'),
(r'\theta', 'THETA'),
(r'\frac', 'FRAC'),
(r'\overline', 'OVERLINE'),
(r'\underline', 'UNDERLINE'),
])
map_post = OrderedDict([
('SUM', r'\sum'),
('THETA', r'\theta'),
('ETA', r'\eta'),
('GAMMA', r'\gamma'),
('FRAC', r'\frac'),
('OVERLINE', r'\overline'),
('UNDERLINE', r'\underline'),
])

expr = p.e_str

for pattern, replacement in tex_map.items():
if r'\sum' in replacement:
replacement = replacement.replace(r'\sum', 'SUM')
if r'sum' in expr:
expr = expr.replace('sum', 'SUM')
if '\eta' in replacement:
replacement = replacement.replace('\eta', 'ETA')
if r'\frac' in replacement:
replacement = replacement.replace(r'\frac', 'FRAC')
for key, val in map_before.items():
if key in replacement:
replacement = replacement.replace(key, val)
if r'\p' in replacement:
continue
try:
Expand All @@ -529,7 +538,7 @@ def _tex_pre(docm, p, tex_map):
except re.error:
logger.error('Remains '*' in the expression.')

for pattern, replacement in special_map.items():
for pattern, replacement in map_post.items():
expr = expr.replace(pattern, replacement)

return expr
Loading
Loading