Skip to content
Discussion options

You must be logged in to vote

The previous reformulation indeed is no longer exact for a minimization problem. For such a problem, we need to introduce binary variables y(x) with a sufficiently large constant M:

   min     𝔼_x[z(x)'x]
A,z(x),y(x)
   s.t.    z(x) <= Ax,                  ∀ x ∈ X
           z(x) <= p_bar,               ∀ x ∈ X
           z(x) >= Ax - My(x),          ∀ x ∈ X
           z(x) >= p_bar - M(1 - y(x)), ∀ x ∈ X
           y(x) ∈ {0, 1},               ∀ x ∈ X
           A >= 0

So in InfiniteOpt we have:

using InfiniteOpt, JuMP, Cbc, Distributions, LinearAlgebra

# Define the constants
N = 2
p_bar = [5.0, 5.0]
M = 1000 # replace with an appropriate value

# Initialize the  model 
m = InfiniteModel

Replies: 24 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pulsipher
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #94 on February 27, 2022 01:54.