Skip to content

Commit

Permalink
Merge pull request #4 from ami-iit/optimizationStructure
Browse files Browse the repository at this point in the history
Add structure to solve optimization problems
  • Loading branch information
S-Dafarra authored Apr 27, 2023
2 parents 22845ca + 3310a86 commit e3685c9
Show file tree
Hide file tree
Showing 12 changed files with 910 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion src/hippopt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from . import base
from .base.continuous_variable import ContinuousVariable, TContinuousVariable
from .base.opti_solver import OptiSolver
from .base.optimization_object import (
OptimizationObject,
StorageType,
TOptimizationObject,
default_storage_field,
)
from .base.optimization_problem import ExpressionType, OptimizationProblem
from .base.parameter import Parameter, TParameter
from .base.variable import TVariable, Variable
8 changes: 7 additions & 1 deletion src/hippopt/base/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from . import optimization_object, parameter, variable
from . import (
continuous_variable,
opti_solver,
optimization_object,
optimization_problem,
parameter,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from hippopt.base.optimization_object import OptimizationObject

TVariable = TypeVar("TVariable", bound="Variable")
TContinuousVariable = TypeVar("TContinuousVariable", bound="ContinuousVariable")


@dataclasses.dataclass
class Variable(OptimizationObject):
class ContinuousVariable(OptimizationObject):
""""""

StorageType: ClassVar[str] = "variable"
StorageType: ClassVar[str] = "continuous_variable"
StorageTypeMetadata: ClassVar[dict[str, Any]] = dict(StorageType=StorageType)
Loading

0 comments on commit e3685c9

Please sign in to comment.