Skip to content

Commit 20d2d6d

Browse files
authored
Merge pull request #125 from nunorc/pr-typos
Fix typos in the tutorials
2 parents 888b03a + cdbce1a commit 20d2d6d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/tutorials/coding_udi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ the :class:`~pygmo.population` ``pop``.
2424
... def get_name(self):
2525
... return "It's my island!"
2626

27-
We have also included above the optional method ``get_name(self)`` that will be used by various ``__repr__(self)`` to provide humar readable information
27+
We have also included above the optional method ``get_name(self)`` that will be used by various ``__repr__(self)`` to provide human readable information
2828
on some pygmo classes. The above UDI can then be used to construct a :class:`~pygmo.island` (similarly to how UDP can be used to construct :class:`~pygmo.problem`, etc..).
2929

3030
.. doctest::

doc/tutorials/coding_udp_constrained.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Neglecting for the time being the fitness, the basic structure for the UDP to ha
4343

4444
Note how we need to specify both the number of equality constraints and the number of inequality constraints (as pygmo by default assumes
4545
0 for both). There is no need to specify the number of objectives as by default pygmo assumes single objective optimization.
46-
The full documenation on the UDP specification can be found in the :class:`pygmo.problem` docs.
46+
The full documentation on the UDP specification can be found in the :class:`pygmo.problem` docs.
4747

4848
We still have to write the fitness function as that is a mandatory method (together with ``get_bounds()``) for all UDPs. Constructing a :class:`~pygmo.problem` with
4949
an incomplete UDP will fail. In pygmo the fitness includes both the objectives and the constraints according to the described order [obj,ec,ic]. All equality constraints
@@ -109,7 +109,7 @@ All seems in order. The dimensions are corresponding to what we wanted, the grad
109109
Solving your constrained UDP
110110
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111111

112-
So we now have a UDP with constraints and a numerical gradient. Let's solve it. Many different startegies can be deployed
112+
So we now have a UDP with constraints and a numerical gradient. Let's solve it. Many different strategies can be deployed
113113
and we here will just try two a) using the augmented lagrangian method b) using monotonic basin hopping.
114114
Consider the following script:
115115

doc/tutorials/coding_udp_minlp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Neglecting, for the time being the fitness, the basic structure for the UDP to h
4444
Note how we need to specify explicitly the number of inequality constraints and the integer problem
4545
dimension (as pygmo otherwise by default assumes 0 for both). Note also that the bounds (for the integer part)
4646
must be integers, otherwise pygmo will complain. There is no need, for this case, to also specify explicitly the number of objectives
47-
as by default pygmo assumes single objective optimization. The full documenation on the UDP optional methods can be
47+
as by default pygmo assumes single objective optimization. The full documentation on the UDP optional methods can be
4848
found in the :class:`pygmo.problem` docs.
4949

5050
We still have to write the fitness function, as that is a mandatory method (together with ``get_bounds()``) for all UDPs. Constructing a :class:`~pygmo.problem` with
@@ -172,6 +172,6 @@ We found a feasible solution! Note that in the other 3 cases no feasible solutio
172172

173173
.. note::
174174
The solution strategy above is, in general, flawed in assuming the best solution of the relaxed problem is close to the
175-
the full MINLP problem solution. More sophisticated techniques would instead search the combinatorial part more exhaustvely.
175+
the full MINLP problem solution. More sophisticated techniques would instead search the combinatorial part more exhaustively.
176176
We used here this approach only to show how simple is, in pygmo, to define and solve the relaxed problem and
177177
to then feedback the optimal decision vector into a MINLP solution strategy.

0 commit comments

Comments
 (0)