Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DisjunctiveProgramming"
uuid = "0d27d021-0159-4c7d-b4a7-9ccb5d9366cf"
authors = ["hdavid16 <[email protected]>"]
version = "0.5.0"
version = "0.6.0"

[deps]
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
Expand Down Expand Up @@ -30,4 +30,4 @@ Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
Juniper = "2ddba703-00a4-53a7-87a5-e8b9971dde84"

[targets]
test = ["Aqua", "HiGHS", "Test", "Juniper", "Ipopt","InfiniteOpt"]
test = ["Aqua", "HiGHS", "Test", "Juniper", "Ipopt", "InfiniteOpt"]
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Generalized Disjunctive Programming (GDP) extension to JuMP.

![logo](logo.png)

[![codecov](https://codecov.io/gh/hdavid16/DisjunctiveProgramming.jl/graph/badge.svg?token=3FRPGMWF0J)](https://codecov.io/gh/hdavid16/DisjunctiveProgramming.jl)
[![codecov](https://codecov.io/github/infiniteopt/DisjunctiveProgramming.jl/graph/badge.svg?token=z2CQwBiWzU)](https://codecov.io/github/infiniteopt/DisjunctiveProgramming.jl)
[![Docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://infiniteopt.github.io/DisjunctiveProgramming.jl/stable/)
[![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://infiniteopt.github.io/DisjunctiveProgramming.jl/dev/)

Expand Down Expand Up @@ -192,7 +192,36 @@ The following reformulation methods are currently supported:
- `final_reform_method`: Reformulation method to apply after cutting plane iterations. Default: `BigM()`.
- `M_value`: Big-M value to use in the relaxed Big-M reformulation during iterations. Default: `1e9`.

## Infinite-Dimensional GDP
To model disjunctions, logical variables, and logical constraints with infinite-dimensional optimization problems (e.g., dynamic and stochastic optimization), DisjunctiveProgramming is also compatible with [InfiniteOpt.jl](https://github.com/infiniteopt/InfiniteOpt.jl). For this, the syntax is largely the same, users simply need to import `InfiniteOpt` and use `InfiniteGDPModel`. They also can use `InfiniteLogical` to declare infinite logical variables as shown below:
```julia
using DisjunctiveProgramming, InfiniteOpt, HiGHS

# Create the model
model = InfiniteGDPModel(HiGHS.Optimizer)

# Create the infinite variables
I = 1:4
@infinite_parameter(model, t ∈ [0, 1], num_supports = 100)
@variable(model, 0 <= g[I] <= 10, Infinite(t))

# Add the disjunctions and their indicator variables
@variable(model, G[I, 1:2], InfiniteLogical(t))
@constraint(model, [i ∈ I, j ∈ 1:2], 0 <= g[i], Disjunct(G[i, 1]))
@constraint(model, [i ∈ I, j ∈ 1:2], g[i] <= 0, Disjunct(G[i, 2]))
@disjunction(model, [i ∈ I], G[i, :])

# Add the logical propositions
@variable(model, W, InfiniteLogical(t))
@constraint(model, G[1, 1] ∨ G[2, 1] ∧ G[3, 1] == W := true)
@constraint(model, 𝔼(binary_variable(W), t) >= 0.95) # incorporate binary variable of logical variable in a nonlogical constraint

# Reformulate and solve
optimize!(model, gdp_method = Hull())

# check the results
value(W)
```

## Release Notes

Expand Down
Loading