Skip to main content

Questions tagged [nonlinear-programming]

For questions about mathematical optimization problems involving a nonlinear objective function and/or nonlinear constraints.

Filter by
Sorted by
Tagged with
2 votes
1 answer
396 views

Implementing a MINLP problem in Pyomo: giving an infeasible solution

I'm trying to implement a MINLP problem which is described in a previous post here: How do we formulate a problem where the decision variable has an index that is also a decision variable? The only ...
Steven01123581321's user avatar
6 votes
3 answers
475 views

How do we formulate a problem where the decision variable has an index that is also a decision variable?

I want to maximize the sum of a nonlinear function $f(.)$ w.r.t. $x$ that is convex in $x$: $$\max \sum_{i=1}^N f(x_i), $$where $x_i$ is a continuous variable and $0 \le x_i < 1$ for $i = 1, 2, \...
Steven01123581321's user avatar
1 vote
1 answer
795 views

OR-Tools: Nonlinear constraints?

I have inherited a reasonably simple ortools-based optimizer (Python) with linear relationships that I need to non-linear-ize, and I have no idea how to do that. The relevant part of my problem looks ...
Matthias Urlichs's user avatar
1 vote
1 answer
133 views

Formulating a continuous NLP problem with a class variable

In this minimization problem we have $N$ items, $j= 1, 2, \dots, N$ and a decision variable $x_j$ which are continuous values. For every item, we have a nonlinear objective function $f$ in function of ...
Steven01123581321's user avatar
5 votes
1 answer
262 views

Optimize selection of metal sheets to keep in stock

I already asked this on stack overflow but just found this forum instead and figured it was more suited here. If this isn't allowed please feel free to tell me and I'll delete the post. I am doing ...
guso141's user avatar
  • 53
-1 votes
2 answers
93 views

How to apply smooth approximation to non-linear complementarity constraints?

$P =$ $ x, if U \geq U^{max} $ $ y, if U^{up} < U < U^{max} $ $ z, if U^{down} < U < U^{up} $ $ \alpha, if U^{min} < U < U^{down} $ $ \beta, if U \leq U^{min} $ Where $P$, and $U$ ...
Ghulam Mohy-ud-din's user avatar
2 votes
0 answers
89 views

Branching the product of binary and continuous variable in Gurobi

I have a binary variable (X) multiplying a continuous variable (Y). I know I can linearize by adding an auxiliary variable (I have that model working), but I now want to do my own branching in the ...
orpanter's user avatar
  • 517
2 votes
1 answer
101 views

Formulate revenue maximization problem and find an appropriate solver

I am trying to maximize expected revenue over a horizon. Consider the following function: \begin{align} sales(budget_1, budget_2) = \sum_te^{C_1t} * budget_1t^{saturation_1t} + e^{C_2t} * budget_2t^{...
jakobhellander's user avatar
4 votes
1 answer
183 views

How to solve a "nearly" linear program

Given a positive integer $n$, a constant $k=2/3$, and $7$ variables $x_1, x_2, x_3, x_{12}, x_{13}, x_{23}, x_{123}$ (non-negative reals or integers) I would like to find: $$\min \binom{x_1}2$$ ...
Fabius Wiesner's user avatar
2 votes
1 answer
117 views

How to mathematically model this multi-objective optimization problem?

I have a system of $M$ machines and $U$ users. Each machine has a capacity in terms of number of resources. Let, machine $m$ has $\zeta_m$ resources. Each user has a service demand $d_u$ and there is ...
KGM's user avatar
  • 2,377
3 votes
1 answer
223 views

How do I pass an objective bound to Gurobi?

I have a non-convex Quadratic Programming over unite simplex set. I have a valid lower bound on the objective function (goal is minimization problem). If I add a constraint like $$f(x)\geq lower~bound,...
Optimization Online's user avatar
1 vote
0 answers
59 views

How to avoid complementarity constraints in continuous nonlinear program?

In my two-stage continuous NLP problem, I have a constraint in second stage: $X_{g,k}$ = $X_{g,0} + a_{g} d_{g} $, if $X_{g,k} \in [X_g^u,X_g^l]$ $X_{g,k} = X_g^u$, if $X_{g,k} \geq X_g^u$ $X_{g,k} ...
Ghulam Mohy-ud-din's user avatar
1 vote
1 answer
74 views

An if-then-else logic whose condition is an inequality

I was hoping to get some help in modelling the following logic. I tried to solve it by "Big-M method" but failed. Thank you in advance! $a(k,n)$ and $b(k,n)$ are known constants, $\lambda$ ...
WaMIMO's user avatar
  • 33
-1 votes
1 answer
152 views

Ipopt finds a better solution if I do not eliminate the zeros in the hessian matrix ?(we eliminate the zeros by defining the structure)

I use Ipopt to solve a problem with sparse hessian and jacobian matrices. If I provide the hessian matrix: its structure, and the non zeros elements in the hessian matrix, it will be really fast. If I ...
Hussein Sharadga's user avatar
0 votes
1 answer
141 views

The max_wall_time and max_cpu_time in ipopt are not working?

The max_wall_time and max_cpu_time are not working in ipopt (cyipopt). See example: ...
Hussein Sharadga's user avatar
0 votes
2 answers
105 views

Bellman Equation for nonlinear model

Consider the following model: \begin{align*} max \quad Z &= 19x_1 - 3x_1^2 + 5x_2^2 - x_2^4 + 4x_3 \\ & s.t. \quad x_1 + 3x_2 + 3x_3 \leq 7 \\ & \quad \quad \quad x_1,x_2,x_3 \geq 0 \end{...
OpenAtTheClose's user avatar
1 vote
1 answer
508 views

Should I provide the hessian matrix, hessian structure, and Jacobian structure if I use cyipopt (IPOPT) if I am concerned about computation time?

If I use IPOPT (cyipopt) to solve nonlinear problems of large scale. It is optional to provide or not provide the hessian matrix, hessian structure, and Jacobian structure. The question is which one ...
Hussein Sharadga's user avatar
2 votes
0 answers
64 views

Minimizing sum of similar functions with a dependence

Consider an objective function in the form of minimization of maximization that is the sum of $N$ similar functions $f\left(x\right)\ge 0$, $\ \forall x$. The summation of all variables is constant (e....
Reza Farahani's user avatar
4 votes
0 answers
103 views

How to linearize or convexify a constraint with a square root of sum of two variables?

Here is the constraint: $$\text{Pa} + \text{Pb}=a + b \sqrt{\text{Ir}^2 +\text{Ii}^2} + c (\text{Ir}^2 +\text{Ii}^2)$$ Here $\text{Pa}, \text{Pb}, \text{Ir},$ and $\text{Ii}$ are variables. $a, b, c$ ...
Ghulam Mohy-ud-din's user avatar
1 vote
2 answers
175 views

How to formulate this NLP problem correctly?

Current status on the problem (what I've done) I'm working on a NLP problem and I got a formulation of the problem, together with the necessary constraints, but I think it needs some adjustments to ...
Steven01123581321's user avatar
3 votes
2 answers
370 views

Can we use continuous variables instead of binary variables in this NLP problem?

The following problem is defined with binary variables $a_{i1}, a_{i2}, a_{i3}, k_1$ and $k_2$. Is it possible to avoid binary variables and to only work with continuous variables? How would we ought ...
Steven01123581321's user avatar
2 votes
1 answer
51 views

Automatic Reformulation Tools For AML Programs

Are there any tools to transform programs written in an algebraic modeling language like GAMS,AMPL,... into a different formulation. E.g. there is a quadratic constraint $\sum_j b_i b_j = N, b \in \...
Lars Hadidi's user avatar
3 votes
0 answers
148 views

Linearize objective function with non-linear terms

I have a problem with linear constraints but in the objective function I want to have some linear terms along with a $x^2$ term. So it is like the following: $$\min \sum \limits _i \sum \limits _j (a[...
christouandr7's user avatar
3 votes
1 answer
157 views

Modelling a nonlinear minimization problem with a nested function

I'm thinking about the following problem: Suppose you have $n$ items and every item $i$ has constants $D_i, p_i$ and $c_i$. $D_i$ is the demand for an item and $p_i$ is the price for that item. Now $...
Steven01123581321's user avatar
7 votes
3 answers
504 views

Profit Maximization LP and Incentives Scenarios

I wrote a profit maximization LP with inventory, component usage, production, and machine hours constraints. When I optimize the model, it solves as expected. When applied towards a business case, ...
TroyE219's user avatar
  • 105
3 votes
1 answer
101 views

Problems involve exponential equality constraints

I have a question like Let, $\mu = (\mu_1,\ldots, \mu_K),$ given $M: K \times m$ a full rank matrix $\min_{\mu \in \mathbb R^K} \sum^n_{i=1}\sum^K_{k=1}(y_{ik} - \mu_k)^2$ subject to $\log \mu = M\...
Sungmin Ji's user avatar
2 votes
1 answer
118 views

Convex Optimization, Non-negativity constraints, Interior-Point or Projected Gradient?

Assume I have the following convex optimization problem, with a convex objective function on conventional non-negativity constraints. \begin{align} \min_{x \geq 0} \sum_{i=1}^{I} a_{i}x_{i} - f(...
econ_ugrad's user avatar
3 votes
0 answers
134 views

How to find robust counterpart of sum of logit functions?

Suppose function $\mu_i(y):\mathbb{R} \rightarrow \mathbb{R}$ is a logit function, $\mu_i(y)=1/(1+\exp(-y))$. Also, we assume that $\mathbf{x}_i\in \mathbb{R}^d$ and $\theta \in \mathbb{R}^d$. I am ...
Amin's user avatar
  • 2,160
3 votes
1 answer
457 views

About Function Manipulation

I have a function as follows (updated after the clarification question): $$\max_{x∈X}\left(\sum\sum c_{ij}x_{ij}-\max_{y∈Y}\sum\sum d_{ij}x_{ij}y_{ij}\right)$$ where $x_{ij},y_{ij}$ are decision ...
user avatar
2 votes
1 answer
157 views

multiple solutions to a nonlinear problem in GAMS

Good afternoon, I have the following doubts Is there a command in GAMS that lets me know when my problem has multiple optimal solutions? Suppose my nonlinear optimization problem has multiple global ...
David Morante's user avatar
5 votes
3 answers
630 views

Model infeasible

What should you do when you face an infeasible solution? I have implemented the model with the dataset from the paper but found infeasible solution.
overboxed's user avatar
  • 593
8 votes
1 answer
510 views

Solving maximization problem with linear-fractional sum

I want to solve this problem : Maximize \begin{equation} \sum_{i=1}^{n} \frac{x_i}{a_ix_i + b_i}\end{equation} with the constraints \begin{equation}\sum_{i=1}^{n}x_i = S \ , \ x_i \geq 0 \ \forall \ ...
ghiloka's user avatar
  • 83
4 votes
1 answer
508 views

Is this a non-linear integer model?

Let's say if I have two decision variables, $f$ and $g$ respectively, where $f$ is continuous, and $g$ is binary. If I have a constraint like this, $$ f\cdot g \le C$$ Does this make my model ...
overboxed's user avatar
  • 593
2 votes
1 answer
135 views

Lifting a 3rd order polynomial into a higher dimensional space

An MINLP from a paper I am reading has the following expression in its constraints: $$ p_{l,s}=z_lb_l\Delta\theta_{l,s}+b_l\lambda_{l,s}u_l\Delta\theta_{l,s} $$ Where from left to right: $p_{l,s}$: ...
Ahmed's user avatar
  • 113
2 votes
3 answers
305 views

Minimizing a monomial function subject to inequality constraints

Assuming an objective function is a multivariable polynomial with real coefficients, in variables {x1, x2, ..., xn} with all exponents no larger than 1, and with linear inequalities on the variables, ...
Kerry M. Soileau's user avatar
3 votes
2 answers
509 views

How do I solve a probability based knapsack problem?

I am looking to maximize my probability of reaching a given target value, by creating multiple groups of 6 items with different means and variances that stay within a weight limit. This is an example ...
will's user avatar
  • 31
5 votes
2 answers
510 views

Minimizing under argmin constraint

I have a problem in the form $$\begin{aligned} \min_a f(a,b)\\ \text{s.t.}\ b =\ & \arg\min_c g(a,c)\\ & \text{s.t.}\ H(a,c) \leq \vec{0} \end{aligned}$$ where $f, g, H$ are all ...
Arktus's user avatar
  • 51
5 votes
2 answers
577 views

Transform nonlinear cost function to get LP or MILP

I'm trying to schedule power of multiple prosumers in a microgrid. The problem includes a cost function with min and max ...
Daniel Stich's user avatar
-4 votes
1 answer
119 views

Octeract website is not working [closed]

I was recommended to use Octeract. I went to their website but it did not open for me. https://octeract.com/ Am I the only one facing this problem? Where can I get the student license?
XXX1010's user avatar
3 votes
1 answer
198 views

Convex optimization with linear constraints. Can I solve it analytically?

I have a constrained convex optimization problem with linear equality and inequality constraints. \begin{align} \label{eq:costf} \text{minimize}\ \ &f(x_1,\dots,x_m) = \sum_{i=1}^m \frac{1}{...
newman_ash's user avatar
2 votes
1 answer
146 views

Software for Feasibility Problems

I face a feasibility problem of type $$ c_i(\boldsymbol x) \leq 0, i = 1, \dots, \mathcal{I} \\ c_e(\boldsymbol x) = 0, e = 1, \dots, \mathcal{E} $$ where $\mathcal{I} + \mathcal{E} \gg \text{dim}(\...
Dan Doe's user avatar
  • 297
7 votes
1 answer
308 views

Nonlinear optimization with constraint involving long product of optimization variables

I solve a nonlinear optimization problem of the form \begin{align} &\max x_0 \text{ such that } \\ &\left[ \sum_{j=0}^N \left(\alpha_j x_0^{j} \prod_{k=3}^j x_k \right)\right]^2 + \left[ \...
Dan Doe's user avatar
  • 297
2 votes
2 answers
242 views

Difference between constraint formulation and performance

I am wondering about the characteristics and performance of some constraints with only binary variables. I assume that solving (integer) linear programs is faster than quadratic ones. At first: $$ a,b,...
Mike's user avatar
  • 147
5 votes
2 answers
591 views

Analyzing the output of IPOPT

I am solving a feasibility (No objective) problem in IPOPT. I got the following output: I see that the violation of the constraints are of order 1e-15. What is the meaning of dual infeasibility 1e-07 ...
Rudinberry's user avatar
1 vote
0 answers
67 views

Dual of a quadratic constraint

This is my model. \begin{align} \min_x&\quad\sum_{e\in E} X_e p_e \\ \text{s.t.}&\quad\sum_{e \in E: T(e)=i} X_e - \sum_{e \in E: H(e)=i} X_e = \begin{cases}1, \;\text{if}\;i=s\\-1,\;\text{if}...
orpanter's user avatar
  • 517
4 votes
2 answers
1k views

How can we write a binary variable as a power to a constant number?

Let $x_{i,j}$ be a two-dimensional binary variable. Is it possible to write $x_{i,j}$ as a power to a number? For example: $$1- 0.3^{x_{i,j}} $$
GTek's user avatar
  • 307
1 vote
1 answer
85 views

If $x=\min\{f(\mathbf{a}),1-\epsilon\}$, how can we model and partition $x$?

I have been dealing with a problem for sometime and although tried different things and asked some questions before, I think the problem might be somewhere that we didn't look before. Variables $0\le ...
user avatar
2 votes
1 answer
74 views

Linearizing $y=\sum_{i=1}^n(z+c)\left(\frac{r_i^2}{1-r_i}\right)\phi_i$

Variables $0\le x< 1$, $y,z\ge 0$. We have a constraint $$y=(z+c)\frac{x^2}{1-x},$$ where constant $c>0$. We partitioned $x$ into $n$ intervals of equal length and defined a new variable $\phi_i=...
user avatar
3 votes
1 answer
86 views

Methods to solve integer linear inequalities with products of two variables

I'm interested in solving the following system of equations over the integers: \begin{align*} x_l^3 &\le x_l^1x_l^2 & \text{ for } l = 1,\ldots,s \\ A x &\le b \\ 0 &\le x \end{align*} ...
user1868607's user avatar
2 votes
1 answer
282 views

Passing exact number of allocations as constraint to pyomo in a sourcing problem

I am solving a sourcing allocation optimization problem. Here I have let's say two brands. Each brand has a raw material demand across the 3 plants (Demand in kg) Brand 1 Brand2 Plant 1 3000 2000 ...
Lakhotia Dipesh's user avatar