1#  ___________________________________________________________________________
2#
3#  Pyomo: Python Optimization Modeling Objects
4#  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
5#  Under the terms of Contract DE-NA0003525 with National Technology and
6#  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
7#  rights in this software.
8#  This software is distributed under the 3-clause BSD License.
9#  ___________________________________________________________________________
10
11from pyomo.core.expr.numvalue import (
12    value, is_constant, is_fixed, is_variable_type,
13    is_potentially_variable, NumericValue, ZeroConstant,
14    native_numeric_types, native_types, polynomial_degree,
15)
16
17from pyomo.core.expr.boolean_value import BooleanValue
18
19from pyomo.core.expr.numeric_expr import linear_expression, nonlinear_expression
20from pyomo.core.expr.logical_expr import (land, lor, equivalent, exactly,
21                                          atleast, atmost, implies, lnot,
22                                          xor, inequality)
23
24from pyomo.core.expr.current import (
25    log, log10, sin, cos, tan, cosh, sinh, tanh,
26    asin, acos, atan, exp, sqrt, asinh, acosh,
27    atanh, ceil, floor,
28    Expr_if,
29)
30
31from pyomo.core.expr.calculus.derivatives import differentiate
32from pyomo.core.expr.taylor_series import taylor_series_expansion
33
34import pyomo.core.kernel
35
36from pyomo.common.collections import ComponentMap
37from pyomo.core.expr.symbol_map import SymbolMap
38from pyomo.core.expr import (numvalue, numeric_expr, boolean_value,
39                             logical_expr, current, symbol_map, sympy_tools,
40                             taylor_series, visitor, expr_common, expr_errors,
41                             calculus)
42from pyomo.core import expr, util, kernel
43
44from pyomo.core.expr.numvalue import (nonpyomo_leaf_types,
45                                      PyomoObject,
46                                      native_numeric_types,
47                                      value, is_constant,
48                                      is_fixed, is_variable_type,
49                                      is_potentially_variable,
50                                      polynomial_degree,
51                                      NumericValue,
52                                      ZeroConstant)
53from pyomo.core.expr.boolean_value import (
54    as_boolean, BooleanConstant, BooleanValue,
55    native_logical_values)
56from pyomo.core.kernel.objective import (minimize,
57                                         maximize)
58from pyomo.core.base.config import PyomoOptions
59
60from pyomo.core.base.expression import Expression
61from pyomo.core.base.label import (CuidLabeler,
62                                   CounterLabeler, NumericLabeler,
63                                   CNameLabeler, TextLabeler,
64                                   AlphaNumericTextLabeler, NameLabeler,
65                                   ShortNameLabeler)
66
67#
68# Components
69#
70from pyomo.core.base.component import (name, Component, ModelComponentFactory)
71from pyomo.core.base.componentuid import ComponentUID
72import pyomo.core.base.indexed_component
73from pyomo.core.base.action import BuildAction
74from pyomo.core.base.check import BuildCheck
75from pyomo.core.base.set import (
76    Set, SetOf, simple_set_rule, RangeSet,
77)
78from pyomo.core.base.param import Param
79from pyomo.core.base.var import (Var, ScalarVar, VarList)
80from pyomo.core.base.boolean_var import (
81    BooleanVar, BooleanVarList, ScalarBooleanVar)
82from pyomo.core.base.constraint import (logical_expr,
83                                        simple_constraint_rule,
84                                        simple_constraintlist_rule,
85                                        ConstraintList, Constraint)
86from pyomo.core.base.logical_constraint import (
87    LogicalConstraint, LogicalConstraintList)
88from pyomo.core.base.objective import (simple_objective_rule,
89                                       simple_objectivelist_rule,
90                                       Objective, ObjectiveList)
91from pyomo.core.base.connector import Connector
92from pyomo.core.base.sos import SOSConstraint
93from pyomo.core.base.piecewise import Piecewise
94from pyomo.core.base.suffix import (active_export_suffix_generator,
95                                    active_import_suffix_generator,
96                                    Suffix)
97from pyomo.core.base.external import ExternalFunction
98from pyomo.core.base.symbol_map import symbol_map_from_instance
99from pyomo.core.base.reference import Reference
100
101from pyomo.core.base.set import (Reals, PositiveReals, NonPositiveReals,
102                                 NegativeReals, NonNegativeReals, Integers,
103                                 PositiveIntegers, NonPositiveIntegers,
104                                 NegativeIntegers, NonNegativeIntegers,
105                                 Boolean, Binary, Any, AnyWithNone, EmptySet,
106                                 UnitInterval, PercentFraction, RealInterval,
107                                 IntegerInterval)
108from pyomo.core.base.misc import display
109from pyomo.core.base.block import (SortComponents, TraversalStrategy,
110                                   Block, ScalarBlock,
111                                   active_components,
112                                   components, active_components_data,
113                                   components_data)
114from pyomo.core.base.PyomoModel import (global_option,
115                                        Model, ConcreteModel,
116                                        AbstractModel)
117from pyomo.core.base.transformation import (
118    Transformation,
119    TransformationFactory,
120)
121#
122from pyomo.core.base import util
123
124from pyomo.core.base.instance2dat import instance2dat
125
126from pyomo.core.util import (prod, quicksum, sum_product, dot_product,
127                             summation, sequence)
128
129# These APIs are deprecated and should be removed in the near future
130from pyomo.core.base.set import (
131    set_options, RealSet, IntegerSet, BooleanSet,
132)
133
134from pyomo.common.deprecation import relocated_module_attribute
135relocated_module_attribute(
136    'SimpleBlock', 'pyomo.core.base.block.SimpleBlock', version='6.0')
137relocated_module_attribute(
138    'SimpleVar', 'pyomo.core.base.var.SimpleVar', version='6.0')
139relocated_module_attribute(
140    'SimpleBooleanVar', 'pyomo.core.base.boolean_var.SimpleBooleanVar',
141    version='6.0'
142)
143del relocated_module_attribute
144