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

remove Pyomo deprecation warnings #314

Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/egret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: [3.7, 3.8, 3.9, '3.10']
pyomo-version: [6.4.0]
python-version: [3.8, 3.9, '3.10', '3.11']
pyomo-version: [6.4.3]
include:
- os: macos-latest
python-version: 3.7
Expand All @@ -39,10 +39,10 @@ jobs:
pyomo-version: 6.4.0
- os: ubuntu-20.04
python-version: 3.7
pyomo-version: main
pyomo-version: 6.4.0
- os: ubuntu-20.04
python-version: '3.11'
pyomo-version: 6.4.3
pyomo-version: main
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
Expand Down
8 changes: 3 additions & 5 deletions egret/model_library/transmission/branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
from egret.data.data_utils import zip_items
from pyomo.core.util import quicksum
from pyomo.core.expr.numeric_expr import LinearExpression
from pyomo.common.dependencies import attempt_import
from collections import OrderedDict
from pyomo.contrib.fbbt.fbbt import fbbt
import warnings
import logging
from typing import List, Tuple, AbstractSet
try:
import coramin
coramin_available = True
except ImportError:
coramin_available = False

coramin, coramin_available = attempt_import("coramin")


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion egret/model_library/unit_commitment/uc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def is_var(v):
return isinstance(v, Var)

def linear_summation(linear_vars, linear_coefs, constant=0.):
return quicksum((c*v for c,v in zip(linear_coefs, linear_vars)), start=constant, linear=True)
return quicksum((c*v for c,v in zip(linear_coefs, linear_vars)), start=constant)

def _linear_expression(linear_vars, linear_coefs, constant=0.):
return LinearExpression(linear_vars=linear_vars, linear_coefs=linear_coefs, constant=constant)
Expand Down
Loading