Skip to content
Discussion options

You must be logged in to vote

Yes, we can accomplish this via the restricted variable syntax for defining point/semi-infinite variables (https://pulsipher.github.io/InfiniteOpt.jl/v0.5/guide/variable/#Restricted-Variables). For instance, we could define an objective that has a terminal variable and an integral over the whole domain as well:

using InfiniteOpt
model = InfiniteModel()
@infinite_parameter(model, t in [0, 1], num_supports = 10)
@variable(model, y, Infinite(t))
@objective(model, Min, y(1) + integral(y^2, t))

Note this syntax is quite flexible to allow you to embed any point variables that you wish to add, including a sum over particular time points.

Replies: 1 comment

Comment options

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