# Tag Info

### How to maximize sum of cosine squared plus sum of sine squarred?

Allowing $\phi_k\in[-2\pi,2\pi]$ gives you enough freedom to achieve any angle $\theta_k$ as the common argument of $\cos$ and $\sin$. A geometric interpretation of your problem is to find a sequence ...
• 32.3k
Accepted

### Question About Fritz John Theorem and Slater Constraint Qualification

Lets break down the statement: There is a ball $U$ about $\mathbf{x}^*$ in $\mathbb{R}^n$. That is, let $U = \{ x \in \mathbb{R}^n : \| x - \mathbf{x}^* \| \leq \rho \}$ be a norm-ball with some ...
Accepted

### $\min\{f(x_1),\dots,f(x_n)\}$ with other constraints

Your model contains a lot more items than are needed. Assume that $M$ is a sufficiently large positive parameter. I'll add two binary variables $z_x$ (used to linearize $\sqrt{x}$) and $z_y$ (used to ...
• 39.3k

### Nonlinear fractional objective function

To supplement the answer by Nikos Kazazakis, I will add that it is always good modeling practice to squeeze as much convexity out of your model as possible, as to reduce degree of nonconvexity. Hence, ...
Accepted

### Derivative-free based optimization subject to a linear constraint

Why do you want derivative-free (see below)? A good derivative-based local optimization solver should be more robust and likely faster executing than a derivative-free solver. If you insist on using a ...
• 13.4k
Accepted

### Is there any literature on constrained nonlinear optimization where constraint returns have to be queried from an oracle?

If $g_{oracle}(x)$ can return gradients, then this is a standard nonlinear optimization problem which can be passed directly to an oracle-based solver like Ipopt (https://github.com/coin-or/Ipopt). ...
• 981
Accepted

### Finding a starting ellipsoid and a minimum volume to approximate a convex optimization problem

Not all convex optimization problems can be solved in polynomial time unless P = NP. Copositve Programs are convex optimization problems. Per this Copositive Programming chapter by Samuel Burer, many ...
• 13.4k

### How to maximise black-box function defined on a subset of integers, with access to its derivative?

For the modelling question, I would say that if there is really more difference between $x_i = 1$ and $x_i = 20$ than between $x_i = 19$ and $x_i = 20$, then using integers might be more relevant. On ...
• 2,623
Accepted

### Lagrangian Multipliers for constraints in nonlinear optimization problems?

Let's assume that you want to minimize $f:\mathbb{R}^n \rightarrow \mathbb{R}$ subject to $g(x)\ge 0$ ($g:\mathbb{R}^n \rightarrow \mathbb{R}^m$) with no particular assumptions on $f$ and $g.$ ...
• 39.3k
1 vote

### Converting a function composing of multipe pieces into a linear equation

I assume here that the $\beta_j$ are all nonnegative. You can linearize the definition of $b_1$ as follows: $$b_1 \le \beta_1 x_1$$ $$b_1 \le \beta_1 x_2$$ $$b_1 \ge \beta_1 (x_1 + x_2 - 1).$$ The ...
• 39.3k
1 vote

### How to maximise black-box function defined on a subset of integers, with access to its derivative?

Let me start with a bit of terminology: we will say $x^{(1)}$ dominates $x^{(2)}$ if $x^{(1)}_i \ge x^{(2)}_i$ for all $i$ and $x^{(1)}_i \gt x^{(2)}_i$ for some value of $i.$ Since $f()$ is ...
• 39.3k
1 vote
Accepted

### How to describe nonlinear programming in gurobipy?

You can apply gurobipy, you just need to approach it differently. How would you code this up for a 100x100 matrix? The current approach using a hardcoded formula is impractical. Instead use the ...
• 166
1 vote

### Algorithms for maximizing the sum of power functions with linear constraints?

Sequential least-squares from Scipy is able to express this directly: Method SLSQP uses Sequential Least SQuares Programming to minimize a function of several variables with any combination of bounds,...
• 450
1 vote
Accepted

### Knitro dimension of lambda for Hessian

Indeed, there is a bug in the Knitro R interface. The size of the lambda array in the callback input is wrong, and the lambda ...
• 2,623
1 vote

### How do I optimize this problem where the constraints and objective are variable?

Your merit function is nonlinear, continuous and differentiable. So long as $C$ is unknown, variable and unbounded, the fact that $V_o$ may be expressed as a function of $P_o$ is immaterial. If $C$ is ...
• 450
1 vote

### How do I optimize this problem where the constraints and objective are variable?

I am not 100% sure, but I am thinking like this: I suppose you can rewrite the objective to: $$\max V_a(P_a-P_o)+V_b(P_b-P_o)$$ since $V_a + V_b = V_o$. And since that sum is also equal to whatever is ...
• 313
1 vote
Accepted

### Knitroms_maxsolves equivalent in Ipopt

As @mark-l-stone says, Ipopt does not have a multi-start option. Just solve your model with different starting points manually.
• 981

Only top scored, non community-wiki answers of a minimum length are eligible