Skip to content

Commit

Permalink
Various spell check corrections (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-garcia authored Apr 11, 2021
1 parent 635efee commit 45ce630
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 94 deletions.
12 changes: 6 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Version 0.21.7 (In development)
A summary of changes are as follows:

- New features:
* Added `primal_feasibility_report`, which can be used to check whether a
primal point statisfies primal feasibility.
* Added `coefficient`, which returns the coefficient associtated with a
* Added `primal_feasibility_report`, which can be used to check whether a
primal point satisfies primal feasibility.
* Added `coefficient`, which returns the coefficient associated with a
variable in affine and quadratic expressions.
* Added `copy_conflict`, which returns the IIS of an infeasible model.
* Added `solution_summary`, which returns (and prints) a struct containing a
summary of the solution.
* Allow `AbstractVector` in vector constraints instead of just `Vector`.
* Added `latex_formulation(model)` which returns an object representing the
* Added `latex_formulation(model)` which returns an object representing the
latex formulation of a model. Use `print(latex_formulation(model))` to print
the formulation as a string.
- Bug fixes:
Expand Down Expand Up @@ -55,7 +55,7 @@ A summary of changes are as follows:
* `` (`\in<tab>`) can now be used in macros instead of `=` or `in`.
* Use `haskey(model::Model, key::Symbol)` to check if a name `key` is
registered in a model.
* Added `unregister(model::Model, key::Symbol)` to unregister a name `key`
* Added `unregister(model::Model, key::Symbol)` to unregister a name `key`
from `model`.
* Added `callback_node_status` for use in callbacks.
* Added `print_bridge_graph` to visualize the bridging graph generated by
Expand All @@ -68,7 +68,7 @@ A summary of changes are as follows:
* Some internal functions that were previously exported are now no longer
exported.
* Fixed a bug when relaxing a fixed binary variable.
* Fixed a `StackOverflowError` that occured when `SparseAxisArray`s had a
* Fixed a `StackOverflowError` that occurred when `SparseAxisArray`s had a
large number of elements.
* Removed an unnecessary type assertion in `list_of_constraint_types`.
* Fixed a bug when copying models with registered expressions.
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ makedocs(
strict = true,
# ==========================================================================
# `modules = [JuMP]`, along with `checkdocs = :exports` causes Documenter to
# thow an error if exported functions with docstrings are not contained in
# throw an error if exported functions with docstrings are not contained in
# the Documentation. However, problematically, we include some MOI docs,
# which forces us to include MOI in `modules`, despite the fact that we
# don't necessarily want to document every MOI method.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/background/algebraic_modeling_languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ a higher-level modeling interface like JuMP.
There are three main parts to MathOptInterface:

1. A solver-independent API that abstracts concepts such as adding and deleting
variables and constraints, settting and getting parameters, and querying
variables and constraints, setting and getting parameters, and querying
results. For more information on the MathOptInterface API, read the
[documentation]([https://jump.dev/MathOptInterface.jl/stable/])

Expand Down
2 changes: 1 addition & 1 deletion docs/src/background/should_i_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ Alternatives to consider are:

!!! note
`Convex.jl` is also built on MathOptInterface, and shares the same set of
underlying solvers. However, you input problems differenly, and Convex.jl
underlying solvers. However, you input problems differently, and Convex.jl
checks that the problem is DCP.
2 changes: 1 addition & 1 deletion docs/src/developers/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ model = Model()
Just as `Bin` and `Int` create binary and integer variables, you can extend
the [`@variable`](@ref) macro to create new types of variables. Here is an
explanation by example, where we create a `AddTwice` type, that creates a tuple
of two JuMP variables instead of a single varaible.
of two JuMP variables instead of a single variable.

First, create a new struct. This can be anything. Our struct holds a
[`VariableInfo`](@ref) object that stores bound information, and whether the
Expand Down
18 changes: 9 additions & 9 deletions docs/src/developers/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ JuMP 1.0 will be ready to release roughly when all of these tasks are completed.
Some but not all of these tasks are summarized in the
[JuMP 1.0 milestone](https://github.com/jump-dev/JuMP.jl/milestone/12).

- Create a website for JuMP. (**Done**: [jump.dev](https://jump.dev))
- Create a website for JuMP (**Done**: [jump.dev](https://jump.dev))
- Deprecate the JuliaOpt organization and move repositories to the
[JuMP-dev](https://github.com/JuMP-dev) organization. (**Done**)
- Address major regressions from JuMP 0.18.
[JuMP-dev](https://github.com/JuMP-dev) organization (**Done**)
- Address major regressions from JuMP 0.18
- Performance ([#1403](https://github.com/jump-dev/JuMP.jl/issues/1403),
[#1654](https://github.com/jump-dev/JuMP.jl/issues/1654),
[#1607](https://github.com/jump-dev/JuMP.jl/issues/1607))
- Callbacks (**Done**: see `examples/callbacks.jl`)
- Column generation syntax (**Done**: see `examples/cutting_stock_column_generation.jl`)
- Support for second-order cones in Gurobi, CPLEX, and Xpress (**Done**)
- Fix issues that we promised MOI would fix.
- Fix issues that we promised MOI would fix
- Checking feasibility of solutions (**Done**: [#2466](https://github.com/jump-dev/JuMP.jl/pull/2466))
- Accessing IIS (**Done**: see [Conflicts](@ref))
- Accessing multiple results from solvers (**Done**: [Gurobi#392](https://github.com/jump-dev/Gurobi.jl/pull/392))
- Dual warm-starts (**Done**: [#2214](https://github.com/jump-dev/JuMP.jl/pull/2214))
- Address easy usability issues
- Address "easy" usability issues
- Line numbers in error messages (**Done**: [#2276](https://github.com/jump-dev/JuMP.jl/pull/2276))
- LP sensitivity summary (**Done**: see [Sensitivity analysis for LP](@ref))
- Inferred element types for collections in macros (**Done**: [#2070](https://github.com/jump-dev/JuMP.jl/pull/2070))
Expand All @@ -35,11 +35,11 @@ Some but not all of these tasks are summarized in the
- Separate how-to, concept explanation, and technical reference following the
[Divio recommendations](https://www.divio.com/blog/documentation/) (**Done**)
- Fully integrate [JuMPTutorials](https://github.com/jump-dev/JuMPTutorials.jl)
with JuMP's documentation. (**Done**)
with JuMP's documentation (**Done**)
- Developer experience
- Get JuMPs unit tests running faster. See [#1745](https://github.com/jump-dev/JuMP.jl/pull/1745). (**Done**)
- All solvers should complete the transition to MOI. (**Done**)
- Provide packages for installing Bonmin and Couenne.
- Get JuMP's unit tests running faster. See [#1745](https://github.com/jump-dev/JuMP.jl/pull/1745). (**Done**)
- All solvers should complete the transition to MOI (**Done**)
- Provide packages for installing Bonmin and Couenne
- [MathOptFormat](https://github.com/odow/MathOptFormat.jl) 1.0 (**Done**)

## MOI 1.0
Expand Down
2 changes: 1 addition & 1 deletion docs/src/developers/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ points more specific to Julia and documentation that use [Documenter](https://gi
- Every exported object needs a docstring
- All examples in docstrings should be [`jldoctests`](https://juliadocs.github.io/Documenter.jl/stable/man/doctests/)
- Always use complete English sentences with proper punctuation
- Do not terminate lists swith punctuation (e.g., as in this doc)
- Do not terminate lists with punctuation (e.g., as in this doc)

Here is an example:
````julia
Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual/nlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ The above code creates a JuMP model with the objective function
User-defined functions cannot be re-registered and will not update if you
modify the underlying Julia function. If you want to change a user-defined
function between solves, rebuild the model or use a different name. To use
a different name programatically, see [Raw expression input](@ref).
a different name programmatically, see [Raw expression input](@ref).

### Register a function and gradient

Expand Down Expand Up @@ -629,7 +629,7 @@ julia> @NLconstraint(model, Min, x + x^2 <= 1)
### More complicated examples

Raw expression input is most useful when the expressions are generated
programatically, often in conjunction with user-defined functions.
programmatically, often in conjunction with user-defined functions.

As an example, we construct a model with the nonlinear constraints `f(x) <= 1`,
where `f(x) = x^2` and `f(x) = sin(x)^2`:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/manual/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ x = @variable(model, [1:2, 1:2], set = PSDCone())
In the section [Variable containers](@ref), we explained how JuMP supports the
efficient creation of collections of JuMP variables in three types of
containers. However, users are also free to create collections of JuMP variables
in their own datastructures. For example, the following code creates a
in their own data structures. For example, the following code creates a
dictionary with symmetric matrices as the values:
```jldoctest; setup=:(model=Model())
julia> variables = Dict{Symbol, Array{VariableRef,2}}()
Expand Down
4 changes: 2 additions & 2 deletions docs/src/tutorials/Conic programs/tips_and_tricks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Random.seed!(1234) # hide
nothing # hide

# !!! tip
# A good resource for learning more about functions which can be modelled
# A good resource for learning more about functions which can be modeled
# using cones is the [MOSEK Modeling Cookbook](https://docs.mosek.com/modeling-cookbook/index.html).

# ## What is a cone?
Expand Down Expand Up @@ -221,4 +221,4 @@ objective_value(model)
# ## Other Cones and Functions

# For other cones supported by JuMP, check out the
# [MathOptInterface Manual](http://jump.dev/MathOptInterface.jl/stable).
# [MathOptInterface Manual](https://jump.dev/MathOptInterface.jl/stable).
18 changes: 9 additions & 9 deletions docs/src/tutorials/Getting started/an_introduction_to_julia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ nothing #hide
# typed (e.g., `1 - 2`), as well as the evaluation of the expression (`-1`).

# Did you notice how Julia didn't print `.0` after some of the numbers? Julia is
# a dynamic language, which means you never have to explictly declare the type
# a dynamic language, which means you never have to explicitly declare the type
# of a variable. However, in the background, Julia is giving each variable a
# type. Check the type of something using the `typeof` function:

Expand Down Expand Up @@ -91,12 +91,12 @@ nothing #hide
π

# !!! tip
# To make π (and most other greek letters), type `\pi` and then press
# To make π (and most other Greek letters), type `\pi` and then press
# `[TAB]`.

typeof(π)

# Athough if we do math with irrational numbers, they get converted to
# However, if we do math with irrational numbers, they get converted to
# `Float64`:

typeof(2π / 3)
Expand Down Expand Up @@ -134,7 +134,7 @@ sin(2π / 3) - √3 / 2

# One way of explaining this difference is to consider how we would write
# `1 / 3` and `2 / 3` using only four digits after the decimal point. We would
# write `1 / 3` as `0.3333`, and `2 / 3` as `0.6667`. So, depiste the fact that
# write `1 / 3` as `0.3333`, and `2 / 3` as `0.6667`. So, despite the fact that
# `2 * (1 / 3) == 2 / 3`, `2 * 0.3333 == 0.6666 != 0.6667`.

# Let's try that again using ≈ (`\approx + [TAB]`) instead of `==`:
Expand Down Expand Up @@ -189,7 +189,7 @@ b = [5, 6]
A = [1.0 2.0; 3.0 4.0]

# Note how this time the type is `Array{Float64, 2}`; the elements are `Float64`
# and there are `2` dimenions.
# and there are `2` dimensions.

# We can do linear algebra:

Expand Down Expand Up @@ -378,7 +378,7 @@ end
# ## Comprehensions

# Similar to languages like Haskell and Python, Julia supports the use of simple
# loops in the construction of arrays and dictionaries, called comprehenions.
# loops in the construction of arrays and dictionaries, called comprehensions.
#
# A list of increasing integers:

Expand Down Expand Up @@ -487,7 +487,7 @@ catch err; showerror(stdout, err) end #hide
# ### Broadcasting

# In the example above, we didn't define what to do if `f` was passed an
# `Array`. Luckily, Julia provides a convienient syntax for mapping `f`
# `Array`. Luckily, Julia provides a convenient syntax for mapping `f`
# element-wise over arrays! Just add a `.` between the name of the function and
# the opening `(`. This works for _any_ function, including functions with
# multiple arguments. For example:
Expand Down Expand Up @@ -525,7 +525,7 @@ println("mutable_type: $(mutable_type)")
println("immutable_type: $(immutable_type)")

# Because `Vector{Int}` is a mutable type, modifying the variable inside the
# function changed the value outside of the function. In constrast, the change
# function changed the value outside of the function. In contrast, the change
# to `immutable_type` didn't modify the value outside the function.

# You can check mutability with the `isimmutable` function:
Expand Down Expand Up @@ -561,7 +561,7 @@ Random.seed!(33)
# Pkg.add("JuMP")
# ```

# For a complete list of registed Julia packages see the package listing at
# For a complete list of registered Julia packages see the package listing at
# [JuliaHub](https://juliahub.com).

# From time to you may wish to use a Julia package that is not registered. In
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ using GLPK

model = Model(GLPK.Optimizer)

# Variables are modelled using [`@variable`](@ref):
# Variables are modeled using [`@variable`](@ref):

@variable(model, x >= 0)

Expand All @@ -120,7 +120,7 @@ model = Model(GLPK.Optimizer)

@objective(model, Min, 12x + 20y)

# Constraints are modelled using [`@constraint`](@ref). Here `c1` and `c2` are
# Constraints are modeled using [`@constraint`](@ref). Here `c1` and `c2` are
# the names of our constraint.

@constraint(model, c1, 6x + 8y >= 100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ u = [10; 11; 12; 13; 14; 15; 16; 17; 18; 19]

# ### Variable types

# The last arguement to the `@variable` macro is usually the variable type. Here
# we'll look at how to specifiy the variable type.
# The last argument to the `@variable` macro is usually the variable type. Here
# we'll look at how to specify the variable type.

# #### Integer variables

Expand Down Expand Up @@ -169,7 +169,7 @@ model = Model()
# ### Constraint references

# While calling the `@constraint` macro, we can also set up a constraint
# reference. Such a referrence is useful for obtaining additional information
# reference. Such a reference is useful for obtaining additional information
# about the constraint, such as its dual solution.

@constraint(model, con, x <= 4)
Expand Down
14 changes: 7 additions & 7 deletions docs/src/tutorials/Getting started/working_with_data_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ import DataFrames
import XLSX

# To read a Excel file into a DataFrame, we use the following julia code. The
# first arguement to the `readtable` function is the file to be read and the
# second arguement is the name of the sheet.
# first argument to the `readtable` function is the file to be read and the
# second argument is the name of the sheet.

excel_df = DataFrames.DataFrame(
XLSX.readtable(joinpath(DATA_DIR, "SalesData.xlsx"), "SalesOrders")...
Expand Down Expand Up @@ -111,14 +111,14 @@ csv_df = CSV.read(joinpath(DATA_DIR, "StarWars.csv"), DataFrames.DataFrame)

ss_df = CSV.read(joinpath(DATA_DIR, "Cereal.txt"), DataFrames.DataFrame)

# We can also specify the delimiter by passing the `delim` arguement.
# We can also specify the delimiter by passing the `delim` argument.

delim_df = CSV.read(
joinpath(DATA_DIR, "Soccer.txt"), DataFrames.DataFrame, delim = "::"
)

# Note that by default, are read-only. If we wish to make changes to the data
# read, we pass the `copycols = true` arguement in the function call.
# read, we pass the `copycols = true` argument in the function call.

ss_df = CSV.read(
joinpath(DATA_DIR, "Cereal.txt"), DataFrames.DataFrame, copycols = true
Expand Down Expand Up @@ -253,8 +253,8 @@ end
# * 1 = no visa required for travel
# * 0 = visa required for travel

# Let us assossciate each passport with a decision variable $pass_{cntr}$ for
# each country. We want to minize the sum $\sum pass_{cntr}$ over all countries.
# Let us associate each passport with a decision variable $pass_{cntr}$ for
# each country. We want to minimize the sum $\sum pass_{cntr}$ over all countries.

# Since we wish to visit all the countries, for every country, we should own at
# least one passport that lets us travel to that country visa free. For one
Expand All @@ -280,7 +280,7 @@ import GLPK

World = names(passport_data)[2:end]

# Then, create the model and intialize the decision variables:
# Then, create the model and initialize the decision variables:
model = Model(GLPK.Optimizer)
@variable(model, pass[cntr in World], Bin)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function example_cannery()
@constraint(
cannery, demand_con[j = 1:num_markets], sum(ship[:, j]) >= demand[j]
)
## Minimize transporatation cost
## Minimize transportation cost
@objective(
cannery,
Min,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

# Intuitively, this problem is about cutting large rolls of paper into smaller
# pieces. There is an exact demand of pieces to meet, and all rolls have the
# same size. The goal is to meet the demand while maximising the profits (each
# same size. The goal is to meet the demand while maximizing the profits (each
# paper roll has a fixed cost, each sold piece allows earning some money),
# which is roughly equivalent to using the smallest amount of rolls
# to cut (or, equivalently, to minimise the amount of paper waste).
# to cut (or, equivalently, to minimize the amount of paper waste).

# This function takes five parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function example_factory_schedule()
[m in months, f in factories],
production[m, f] >= d_min_cap[m, f] * status[m, f],
)
## The production cannot be more tha maximum capacity.
## The production cannot be more that maximum capacity.
@constraint(
model,
[m in months, f in factories],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import GLPK
# 2. upper bounds on $u_{i}$
# 3. nonnegativity of the decision variables $u_{i}$, $v_{i}$ and $w_{i}$.

# Our objective will be to simply maximimse the company's wealth in June, which
# Our objective will be to simply maximize the company's wealth in June, which
# say we represent with the variable $m$.

financing = Model(GLPK.Optimizer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ max_flow = Model(GLPK.Optimizer)
@variable(max_flow, f[1:n,1:n] >= 0)
# Capacity constraints
@constraint(max_flow, [i = 1:n, j = 1:n], f[i,j] <= G[i,j])
# Flow conservation contraints
# Flow conservation constraints
@constraint(max_flow, [i = 1:n; i != 1 && i != 8], sum(f[i,:]) == sum(f[:,i]))
@objective(max_flow, Max, sum(f[1, :]))

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/Mixed-integer linear programs/sudoku.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# ![Partially solved Sudoku](../../assets/partial_sudoku.svg)

# Solving a Sudoku isn't an optimization problem with an objective; its actually
# a *feasibility* problem: we wish to find a feasible solution that satsifies
# a *feasibility* problem: we wish to find a feasible solution that satisfies
# these rules. You can think of it as an optimization problem with an objective
# of 0.
#
Expand Down
Loading

0 comments on commit 45ce630

Please sign in to comment.