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

Replace _BlockData with BlockData #144

Merged
merged 2 commits into from
Aug 22, 2024
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
2 changes: 1 addition & 1 deletion docs/api_doc/omlt.block.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OMLT Block
:show-inheritance:

.. note::
`OmltBlock` is the name used to declare the custom Pyomo block which is exposed to the user. The block functionality is given by `OmltBlockData` which inherits from Pyomo `_BlockData`.
`OmltBlock` is the name used to declare the custom Pyomo block which is exposed to the user. The block functionality is given by `OmltBlockData` which inherits from Pyomo `BlockData`.

.. autoclass:: omlt.block.OmltBlockData
:members:
Expand Down
4 changes: 2 additions & 2 deletions src/omlt/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class is used in combination with a formulation object to construct the
"""

import pyomo.environ as pyo
from pyomo.core.base.block import _BlockData, declare_custom_block
from pyomo.core.base.block import BlockData, declare_custom_block


@declare_custom_block(name="OmltBlock")
class OmltBlockData(_BlockData):
class OmltBlockData(BlockData):
def __init__(self, component):
super().__init__(component)
self.__formulation = None
Expand Down
Loading