@@ -35,19 +35,19 @@ Pyomo.DAE introduces three new modeling components to Pyomo:
35
35
36
36
As will be shown later, differential equations can be declared using
37
37
using these new modeling components along with the standard Pyomo
38
- :py:class: `Var< .Var> ` and
39
- :py:class: `Constraint< .Constraint> ` components.
38
+ :py:class: `.Var ` and
39
+ :py:class: `.Constraint ` components.
40
40
41
41
ContinuousSet
42
42
*************
43
43
44
44
This component is used to define continuous bounded domains (for example
45
45
'spatial' or 'time' domains). It is similar to a Pyomo
46
- :py:class: `Set < .Set> ` component and can be used to index things
46
+ :py:class: `.Set ` component and can be used to index things
47
47
like variables and constraints. Any number of
48
48
:py:class: `ContinuousSets <pyomo.dae.ContinuousSet> ` can be used to index a
49
49
component and components can be indexed by both
50
- :py:class: `Sets < .Set> ` and
50
+ :py:class: `.Set ` and
51
51
:py:class: `ContinuousSets <pyomo.dae.ContinuousSet> ` in arbitrary order.
52
52
53
53
In the current implementation, models with
@@ -112,9 +112,9 @@ abstract Pyomo model using the example data file.
112
112
113
113
.. note ::
114
114
Most valid ways to declare and initialize a
115
- :py:class: `Set < .Set> ` can be used to
115
+ :py:class: `.Set ` can be used to
116
116
declare and initialize a :py:class: `ContinuousSet<pyomo.dae.ContinuousSet> `.
117
- See the documentation for :py:class: `Set < .Set> ` for additional
117
+ See the documentation for :py:class: `.Set ` for additional
118
118
options.
119
119
120
120
.. warning ::
@@ -129,7 +129,7 @@ abstract Pyomo model using the example data file.
129
129
.. note ::
130
130
:py:class: `ContinuousSet <pyomo.dae.ContinuousSet> ` components are
131
131
always ordered (sorted) therefore the ``first() `` and ``last() ``
132
- :py:class: `Set < .Set> ` methods can be used to access the lower
132
+ :py:class: `.Set ` methods can be used to access the lower
133
133
and upper boundaries of the
134
134
:py:class: `ContinuousSet <pyomo.dae.ContinuousSet> ` respectively
135
135
@@ -146,7 +146,7 @@ Pyomo model. In each case, the variable being differentiated is supplied
146
146
as the only positional argument and the type of derivative is specified
147
147
using the 'wrt' (or the more verbose 'withrespectto') keyword
148
148
argument. Any keyword argument that is valid for a Pyomo
149
- :py:class: `Var < .Var> ` component may also be specified.
149
+ :py:class: `.Var ` component may also be specified.
150
150
151
151
.. doctest ::
152
152
@@ -182,16 +182,16 @@ argument. Any keyword argument that is valid for a Pyomo
182
182
The 'initialize' keyword argument will initialize the value of a
183
183
derivative and is **not ** the same as specifying an initial
184
184
condition. Initial or boundary conditions should be specified using a
185
- :py:class: `Constraint< .Constraint> ` or
186
- :py:class: `ConstraintList< .ConstraintList> ` or
187
- by fixing the value of a :py:class: `Var< .Var> ` at a boundary
185
+ :py:class: `.Constraint ` or
186
+ :py:class: `.ConstraintList ` or
187
+ by fixing the value of a :py:class: `.Var ` at a boundary
188
188
point.
189
189
190
190
Declaring Differential Equations
191
191
--------------------------------
192
192
193
193
A differential equations is declared as a standard Pyomo
194
- :py:class: `Constraint< .Constraint> ` and is not required to have
194
+ :py:class: `.Constraint ` and is not required to have
195
195
any particular form. The following code snippet shows how one might declare
196
196
an ordinary or partial differential equation.
197
197
@@ -226,12 +226,12 @@ an ordinary or partial differential equation.
226
226
... return m.dydt[t, l] == m.dydl2[t, l]
227
227
>>> model.pde = pyo.Constraint(model.t, model.l, rule = _pde_rule)
228
228
229
- By default, a :py:class: `Constraint< .Constraint> ` declared over a
229
+ By default, a :py:class: `.Constraint ` declared over a
230
230
:py:class: `ContinuousSet<pyomo.dae.ContinuousSet> ` will be applied at every
231
231
discretization point contained in the set. Often a modeler does not want to
232
232
enforce a differential equation at one or both boundaries of a continuous
233
233
domain. This may be addressed explicitly in the
234
- :py:class: `Constraint< .Constraint> ` declaration using
234
+ :py:class: `.Constraint ` declaration using
235
235
``Constraint.Skip `` as shown above. Alternatively, the desired constraints can
236
236
be deactivated just before the model is sent to a solver as shown below.
237
237
@@ -294,7 +294,7 @@ Declaring Integrals
294
294
:members:
295
295
296
296
Declaring an :py:class: `Integral<pyomo.dae.Integral> ` component is similar to
297
- declaring an :py:class: `Expression< .Expression> ` component. A
297
+ declaring an :py:class: `.Expression ` component. A
298
298
simple example is shown below:
299
299
300
300
.. doctest ::
@@ -326,7 +326,7 @@ is being evaluated over. This is done using the 'wrt' keyword argument.
326
326
ensure consistency in the ordering and dimension of the indexing sets
327
327
328
328
After an :py:class: `Integral<pyomo.dae.Integral> ` has been declared, it can be
329
- used just like a Pyomo :py:class: `Expression< .Expression> `
329
+ used just like a Pyomo :py:class: `.Expression `
330
330
component and can be included in constraints or the objective function as shown
331
331
above.
332
332
@@ -342,7 +342,7 @@ positional argument. This should become more clear with the following example
342
342
showing a double integral over the
343
343
:py:class: `ContinuousSet<pyomo.dae.ContinuousSet> ` components ``model.t1 `` and
344
344
``model.t2 ``. In addition, the expression is also indexed by the
345
- :py:class: `Set< .Set> ` ``model.s ``. The mathematical representation
345
+ :py:class: `.Set ` ``model.s ``. The mathematical representation
346
346
and implementation in Pyomo are shown below:
347
347
348
348
.. math ::
@@ -416,7 +416,7 @@ discretization equations for this method are shown below:
416
416
417
417
where :math: `h` is the step size between discretization points or the size of
418
418
each finite element. These equations are generated automatically as
419
- :py:class: `Constraints< .Constraint> ` when the backward
419
+ :py:class: `.Constraint ` when the backward
420
420
difference method is applied to a Pyomo model.
421
421
422
422
There are several discretization options available to a
0 commit comments