# \#infiniteopt

**URL:** https://discourse.julialang.org/tag/infiniteopt/1273.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [JuMP: unused \`@operator\` has critical impact](https://discourse.julialang.org/t/jump-unused-operator-has-critical-impact/136895)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 2\
**Last updated:** [April 27, 2026, 5:45am UTC](https://discourse.julialang.org/t/jump-unused-operator-has-critical-impact/136895 "2026-04-27T05:45:25Z")

</div>

I have some model defined like fake\_fun(a,b) = 0 function my\_model() ... @operator(m, unused\_op, 2, fake\_fun) ... end where both unused\_op and fake\_fun are not used anywhere except on that line. With thi…

---

## [Cart-pole trajectory optimization with ModelingToolkit, Multibody and JuliaSimCompiler model, how to improve performance? Constraints jacobian sparsity pattern issue?](https://discourse.julialang.org/t/cart-pole-trajectory-optimization-with-modelingtoolkit-multibody-and-juliasimcompiler-model-how-to-improve-performance-constraints-jacobian-sparsity-pattern-issue/127856)

<div class="topic-metadata">

**Author:** [@Odie](https://discourse.julialang.org/u/Odie)\
**Replies:** 7\
**Last updated:** [April 14, 2025, 2:15pm UTC](https://discourse.julialang.org/t/cart-pole-trajectory-optimization-with-modelingtoolkit-multibody-and-juliasimcompiler-model-how-to-improve-performance-constraints-jacobian-sparsity-pattern-issue/127856 "2025-04-14T14:15:30Z")

</div>

Hi! I’m trying to do a trajectory optimization problem with a direct collocation method on my own model. To begin with, I decided to reproduce a documented problem : the cart-pole. I used ModelingToolkit and Multibody …

---

## [How to use time-dependant parameters in InfiniteOpt](https://discourse.julialang.org/t/how-to-use-time-dependant-parameters-in-infiniteopt/124092)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 8\
**Last updated:** [December 26, 2024, 5:16pm UTC](https://discourse.julialang.org/t/how-to-use-time-dependant-parameters-in-infiniteopt/124092 "2024-12-26T17:16:24Z")

</div>

I am using InfiniteOpt and I would like to have a parameter time-dependent. For example, in their “eating the cake” optimal consumption model, I would like to define the utility function with a multiplier that change wi…

---

## [Disable package extension](https://discourse.julialang.org/t/disable-package-extension/123779)

<div class="topic-metadata">

**Author:** [@afossa](https://discourse.julialang.org/u/afossa)\
**Replies:** 2\
**Last updated:** [December 12, 2024, 8:07pm UTC](https://discourse.julialang.org/t/disable-package-extension/123779 "2024-12-12T20:07:30Z")

</div>

Hello, Is it possible to “disable” an extension of a package, marked with \[extension\] in the package Project.toml? My use case is the following: I have an environment with ModelingToolkit as dependency, and I want to …

---

## [Any toy version of the DICE model for climate change available in Julia?](https://discourse.julialang.org/t/any-toy-version-of-the-dice-model-for-climate-change-available-in-julia/119134)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [September 9, 2024, 3:25am UTC](https://discourse.julialang.org/t/any-toy-version-of-the-dice-model-for-climate-change-available-in-julia/119134 "2024-09-09T03:25:55Z")

</div>

Does any “toy” (oversemplified) versions of the dice model model for assessing climate change optimal societal actions is available in Julia? Perhaps based on Jump/InfiniteOpt?

---

## [InfiniteOpt: Unable to put expressions with divide operation into objective](https://discourse.julialang.org/t/infiniteopt-unable-to-put-expressions-with-divide-operation-into-objective/113661)

<div class="topic-metadata">

**Author:** [@aruna-ram](https://discourse.julialang.org/u/aruna-ram)\
**Replies:** 7\
**Last updated:** [May 2, 2024, 9:31am UTC](https://discourse.julialang.org/t/infiniteopt-unable-to-put-expressions-with-divide-operation-into-objective/113661 "2024-05-02T09:31:25Z")

</div>

Hi there! I am quite new to Julia and JuMP/InfiniteOpt. I’m trying to solve a time optimal control problem. I have an issue when I incorporate an expression using the divide operator into the objective function. The fol…

---

## [Implementing a squarewave: Can't take remainder of InfiniteOpt.GeneralVariableRef](https://discourse.julialang.org/t/implementing-a-squarewave-cant-take-remainder-of-infiniteopt-generalvariableref/111955)

<div class="topic-metadata">

**Author:** [@lpz18](https://discourse.julialang.org/u/lpz18)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 1:50am UTC](https://discourse.julialang.org/t/implementing-a-squarewave-cant-take-remainder-of-infiniteopt-generalvariableref/111955 "2024-03-27T01:50:25Z")

</div>

I have a squarewave implemented like so: function sqw(t; period::Float64=1, duty::Float64=0.5) return t % period \< duty\*period ? 1.0 : 0.0 end I am running an InfiniteOpt.jl optimization where I pass in sqw as a param…

---

## [Eating the cake (nat res depletion model) with endogenous time horizon in InfiniteOpt](https://discourse.julialang.org/t/eating-the-cake-nat-res-depletion-model-with-endogenous-time-horizon-in-infiniteopt/100235)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [June 14, 2023, 1:59pm UTC](https://discourse.julialang.org/t/eating-the-cake-nat-res-depletion-model-with-endogenous-time-horizon-in-infiniteopt/100235 "2023-06-14T13:59:50Z")

</div>

Hello, I am trying to numerically solve the dynamic problem of optimal natural resource depletion (aka “eating the cake”) with InfiniteOpt.jl. The script below works fine, but for the time horizon (i.e. the upper bound …

---

## [Inconsistent solutions from JuMP vs InfiniteOpt for discretized optimal control](https://discourse.julialang.org/t/inconsistent-solutions-from-jump-vs-infiniteopt-for-discretized-optimal-control/96539)

<div class="topic-metadata">

**Author:** [@mbanchio](https://discourse.julialang.org/u/mbanchio)\
**Replies:** 4\
**Last updated:** [March 24, 2023, 5:53pm UTC](https://discourse.julialang.org/t/inconsistent-solutions-from-jump-vs-infiniteopt-for-discretized-optimal-control/96539 "2023-03-24T17:53:48Z")

</div>

Hello everyone, I have been playing around with JuMP recently to understand the structure of an optimal control problem. For clarity, the problem is the following. I want to find the function x(c,\\theta) such that \\fora…

---

## [Error in InfiniteOpt.jl quick start example](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 5\
**Last updated:** [February 9, 2023, 7:23pm UTC](https://discourse.julialang.org/t/error-in-infiniteopt-jl-quick-start-example/94275 "2023-02-09T19:23:37Z")

</div>

Hi everyone, I have tried to run a tutorial example in InfiniteOpt.jl. using InfiniteOpt, Distributions, Ipopt # DEFINE THE PROBLEM CONSTANTS μ = 1; σ = 0.2 x0 = \[0, 0\]; v0 = \[0, 0\] p = \[1 4 6 1; 1 3 0 1\]; tw = \[0,…
