Skip to content

Commit 6452ea6

Browse files
Fix some typos in the documentation (#995)
* typos * another comma
1 parent 70fc572 commit 6452ea6

17 files changed

+45
-45
lines changed

docs/extend.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Code contributions are very welcome and should comply to a few rules:
4444
- Before implementing a new PySCIPOpt feature, check whether the
4545
feature exists in SCIP. If so, implement it as a pure wrapper,
4646
mimicking SCIP whenever possible. If the new feature does not exist
47-
in SCIP but it is close to an existing one, consider if implementing
47+
in SCIP, but it is close to an existing one, consider if implementing
4848
that way is substantially convenient (e.g. Pythonic). If it does
4949
something completely different, you are welcome to pull your request
5050
and discuss the implementation.
@@ -77,7 +77,7 @@ API. By design, we distinguish different functions in PySCIPOPT:
7777
Ideally speaking, we want every SCIP function to be wrapped in PySCIPOpt.
7878

7979
**Convenience functions** are additional, non-detrimental features meant
80-
to help prototyping the Python way. Since these functions are not in
80+
to help prototype the Python way. Since these functions are not in
8181
SCIP, we wish to limit them to prevent difference in features between
8282
SCIP and PySCIPOPT, which are always difficult to maintain. A few
8383
convenience functions survive in PySCIPOpt when keeping them is

docs/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ is not automatically deleted, and thus stops a new optimization call.
6060
Why can I not add a non-linear objective?
6161
=========================================
6262

63-
SCIP does not support non-linear objectives, however, an equivalent optimization
63+
SCIP does not support non-linear objectives. However, an equivalent optimization
6464
problem can easily be constructed by introducing a single new variable and a constraint.
6565
Please see :doc:`this page <tutorials/expressions>` for a guide.

docs/similarsoftware.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Alternate MIP Solvers (with Python interfaces)
99

1010
In the following we will give a list of other mixed-integer optimizers with available python interfaces.
1111
As each solver has its own set of problem classes that it can solve we will use a table with reference
12-
keys to summarise these problem classes.
12+
keys to summarize these problem classes.
1313

1414
.. note:: This table is by no means complete.
1515

@@ -87,8 +87,8 @@ This is software that is built on PySCIPOpt
8787

8888
- `PyGCGOpt <https://github.com/scipopt/PyGCGOpt>`_: An extension of SCIP, using generic decompositions for solving MIPs
8989
- `GeCO <https://github.com/CharJon/GeCO>`_: Generators for Combinatorial Optimization
90-
- `scip-routing <https://github.com/mmghannam/scip-routing>`_: An exact VRPTW solver in Python
91-
- `PySCIPOpt-ML <https://github.com/Opt-Mucca/PySCIPOpt-ML>`_: Python interface to automatically formulate Machine Learning models into Mixed-Integer Programs
90+
- `scip-routing <https://github.com/mmghannam/scip-routing>`_: An exact VRPTW solver in Python
91+
- `PySCIPOpt-ML <https://github.com/Opt-Mucca/PySCIPOpt-ML>`_: Python interface to automatically formulate Machine Learning models into Mixed-Integer Programs
9292
- `SCIP Book <https://scipbook.readthedocs.io/en/latest/>`_: Mathematical Optimization: Solving Problems using SCIP and Python
9393

9494
Additional SCIP Resources

docs/tutorials/branchrule.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ whose LP solution is most fractional.
5858
5959
return {"result": SCIP_RESULT.BRANCHED}
6060
61-
Let's talk about some features of this branching rule. Currently we only explicitly programmed
61+
Let's talk about some features of this branching rule. Currently, we only explicitly programmed
6262
a single function, which is called ``branchexeclp``. This is the function that gets called
6363
when branching on an LP optimal solution. While this is the main case, it is not the only
6464
case that SCIP handles. What if there was an LP error at the node, or you are given a set of external
@@ -108,7 +108,7 @@ strong branching or obtain some strong branching information.
108108

109109
- What happens if a new primal solution is found and the bound is larger than the cutoff bound?
110110
- What happens if the bound for one of the children is above a cutoff bound?
111-
- If probing is enabled then one would need to handle new found bounds appropriately.
111+
- If probing is enabled then one would need to handle new-found bounds appropriately.
112112

113113
.. code-block:: python
114114

docs/tutorials/constypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ constraint, you'd use the code:
134134
135135
SCIP also allows the creation of custom constraint handlers. These could be empty and just
136136
there to record data, there to provide custom handling of some user defined function, or they could be there to
137-
enforce a constraint that is incredibly inefficient to enforce via linear constraints.
137+
enforce a constraint that is incredibly inefficient to enforce via linear constraints.
138138
An example of such a constraint handler
139139
is presented in the lazy constraint tutorial for modelling the subtour elimination
140140
constraints :doc:`here </tutorials/lazycons>`
@@ -146,8 +146,8 @@ In a similar fashion to Variables with columns, see :doc:`this page </tutorials/
146146
constraints bring up an interesting feature of SCIP when used in the context of an LP.
147147
The context of an LP here means that we are after the LP relaxation of the optimization problem
148148
at some node. Is the constraint even in the LP?
149-
When you solve an optimization problm with SCIP, the problem is first transformed. This process is
150-
called presolve, and is done to accelerate the subsequent solving process. Therefore a constraint
149+
When you solve an optimization problem with SCIP, the problem is first transformed. This process is
150+
called presolve, and is done to accelerate the subsequent solving process. Therefore, a constraint
151151
that was originally created may have been transformed entirely, as the original variables that
152152
featured in the constraint have also been changed. Additionally, maybe the constraint was found to be redundant,
153153
i.e., trivially true, and was removed. The constraint is also much more general

docs/tutorials/cutselector.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A cut selector in PySCIPOpt takes the following structure:
3333
"""
3434
:param cuts: the cuts which we want to select from. Is a list of scip Rows
3535
:param forcedcuts: the cuts which we must add. Is a list of scip Rows
36-
:param root: boolean indicating whether weare at the root node
36+
:param root: boolean indicating whether we are at the root node
3737
:param maxnselectedcuts: int which is the maximum amount of cuts that can be selected
3838
:return: sorted cuts and forcedcuts
3939
"""
@@ -58,14 +58,14 @@ To include a cut selector one would need to do something like the following code
5858
5959
The final argument of the ``includeCutsel`` function in the example above was the
6060
priority. If the priority is higher than all other cut selectors then it will be called
61-
first. In the case of some failure or non-success return code, then the second highest
61+
first. In the case of some failure or non-success return code, then the second-highest
6262
priority cut selector is called and so on.
6363

6464
Example Cut Selector
6565
======================
6666

6767
In this example we will program a cut selector that selects the 10 most
68-
efficacious cuts. Efficacy is the standard measure for cut quality and can be calcuated
68+
efficacious cuts. Efficacy is the standard measure for cut quality and can be calculated
6969
via SCIP directly.
7070

7171
.. code-block:: python

docs/tutorials/eventhandler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The first argument is the model object and the second argument is the event that
5151
Adding Event Handlers with Classes
5252
==================================
5353

54-
If you need to store additional data in the event handler, you can create a custom event handler class that inherits from :code:`pyscipopt.Eventhdlr`.
54+
If you need to store additional data in the event handler, you can create a custom event handler class that inherits from :code:`pyscipopt.Eventhdlr`,
5555
and then include it in the model using the :code:`Model.includeEventHandler` method. The following is an example that stores the number of best solutions found:
5656

5757
.. code-block:: python

docs/tutorials/expressions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Non-Linear Objectives
2424
======================
2525

2626
While SCIP supports general non-linearities, it only supports linear objective functions.
27-
With some basic reformulation this is not a restriction however. Let's consider the general
27+
With some basic reformulation this is not a restriction, however. Let's consider the general
2828
optimization problem:
2929

3030
.. math::
@@ -118,7 +118,7 @@ Absolute (Abs)
118118
===============
119119

120120
Absolute values of expressions is supported by overloading how ``__abs__`` function of
121-
SCIP expression objects. Therefore one does not need to import any functions.
121+
SCIP expression objects. Therefore, one does not need to import any functions.
122122
Let's see an example for constructing the following constraint:
123123

124124
.. math::

docs/tutorials/heuristic.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ To include the heuristic in the SCIP model one would use the following code:
9797
9898
.. note:: The ``timingmask`` is especially important when programming your own heuristic. See
9999
`here <https://www.scipopt.org/doc/html/HEUR.php>`_ for information on timing options and how the affect
100-
when the heuristic can be called. Note also that heuristic are as other plugins, called in order of
100+
when the heuristic can be called. Note also that heuristics are, as other plugins, called in order of
101101
their priorities.
102102

103103
.. note:: When you create a SCIP solution object it is important that you eventually free the object.
104104
This is done by calling ``scip.freeSol(sol)``, although this is not necessary when the solution has been
105-
passed to ``scip.trySol(sol)`` with ``free=True`` (default behaviour).
105+
passed to ``scip.trySol(sol)`` with ``free=True`` (default behavior).
106106

docs/tutorials/lazycons.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Why use a Constraint Handler?
2424
=============================
2525

2626
SCIP does not have a lazy constraint plug-in, rather its definition of constraint is broad enough to
27-
naturally encompass lazy constraints already. Therefore the user must simply create an appropriate
27+
naturally encompass lazy constraints already. Therefore, the user must simply create an appropriate
2828
constraint handler.
2929

3030

@@ -48,8 +48,8 @@ integer programming formulation for the problem is:
4848
& & & x_{i,j} \in \{0,1\}, \quad \forall (i,j) \in \mathcal{V} \times \mathcal{V}
4949
5050
In the above formulation, the second set of constraints (marked with an \*) are called subtour elimination constraints.
51-
They are called such as a valid solution in absense of those constraints might consist of a collection
52-
of smaller cycles instead of a single large cycle. As the constraint set requires checking every subset of nodes
51+
They are called such as a valid solution in absence of those constraints might consist of a collection
52+
of smaller cycles instead of a single large cycle. As the constraint set requires checking every subset of nodes,
5353
there are exponentially many. Moreover, we know that most of the constraints are probably unnecessary,
5454
because it is clear from the objective that a minimum tour does not exist with a mini-cycle of nodes that are
5555
extremely far away from each other. Therefore, we want to model them as lazy constraints!
@@ -147,7 +147,7 @@ Now we will create the code on how to implement such a constraint handler.
147147
148148
# add subtour elimination constraint for each subtour
149149
for S in subtours:
150-
print("Constraint added!)
150+
print("Constraint added!")
151151
self.model.addCons(quicksum(x[i][j] for i in S for j in S if j>i) <= len(S)-1)
152152
consadded = True
153153
@@ -164,7 +164,7 @@ Now we will create the code on how to implement such a constraint handler.
164164
165165
In the above we've created our problem and custom constraint handler! We now need to actually
166166
add the constraint handler to the problem. After that, we can simply call ``optimize`` whenever we are ready.
167-
To add the costraint handler use something along the lines of the following:
167+
To add the constraint handler use something along the lines of the following:
168168

169169
.. code-block:: python
170170

0 commit comments

Comments
 (0)