Skip to content

Why Is this Infeasible? #335

Answered by pulsipher
chelseas asked this question in Q&A
Jan 30, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @chelseas, I took a closer look and found that the problem is that your problem is infeasible. The culprit is the battery ODE:

using InfiniteOpt, Ipopt

m = InfiniteModel(Ipopt.Optimizer)
@infinite_parameter(m, t in [0,60], num_supports = 100)

@variable(m, b, Infinite(t))

@constraint(m, b(0) == 100)
@constraint(m, (b, t) == -.25*t)

@constraint(m, b >= 0) # this constraint makes it infeasible

optimize!(m)

Here, the ODE for b has no degrees of freedom and is totally determined with the initial condition. It's solution must be negative after a certain time. If we remove that constraint it works:

using InfiniteOpt, Ipopt

m = InfiniteModel(Ipopt.Optimizer)
@infinite_parameter(m, t in [0,

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@pulsipher
Comment options

@chelseas
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by chelseas
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