Skip to content

Commit

Permalink
Merge pull request #314 from bknueven/pyomo_deprecation_warnings
Browse files Browse the repository at this point in the history
remove Pyomo deprecation warnings
  • Loading branch information
bknueven authored Nov 14, 2023
2 parents 2b9001a + e305013 commit 03f1f01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
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

0 comments on commit 03f1f01

Please sign in to comment.