New answers tagged nonlinear-programming
3
votes
Accepted
How can we write a binary variable as a power to a constant number?
Suppose it is needed to linearize the expression $Z=P^U$. It can be written as $$Z=U\times P+1-U$$
where $U$ is a binary variable and $P$ is a parameter. This is a general formulation for calculating $...
14
votes
How can we write a binary variable as a power to a constant number?
If you check the two cases for $x_{i,j}$, you will see that you can rewrite the expression as a linear function of $x_{i,j}$:
$x_{i,j}=0$ yields $1-0.3^0=0$
$x_{i,j}=1$ yields $1-0.3^1=0.7$
So $1-0....
2
votes
Accepted
If $x=\min\{f(\mathbf{a}),1-\epsilon\}$, how can we model and partition $x$?
Start with the constraints $$x \le f(\mathbf{a})$$ and $$x \le 1-\epsilon.$$ If the nature of the problem is that larger values of $x$ are always preferable in objective terms to smaller values of $x$,...
4
votes
Accepted
Linearizing $y=\sum_{i=1}^n(z+c)\left(\frac{r_i^2}{1-r_i}\right)\phi_i$
You are on the right track. Linearizing the product of a continuous variable ($\xi_i$) and a binary variable ($\phi_i$) is a FAQ. See, for instance, How to linearize the product of a binary and a non-...
2
votes
Methods to solve integer linear inequalities with products of two variables
One classic technique is to reformulate the integer variables as a bunch of binary variables. In this case i would use a encoding with powers of 2 and then use a multiplier circuit to express the ...
1
vote
Passing exact number of allocations as constraint to pyomo in a sourcing problem
I will first formalize the described problem in mathematical notations, I think it is more suitable, rather than a piece of code, for providing a better understanding.
So, let
$B$ be the brands set;
$...
Top 50 recent answers are included
Related Tags
nonlinear-programming × 134optimization × 44
linearization × 25
nonconvex-programming × 22
mixed-integer-programming × 21
solver × 13
python × 11
pyomo × 11
linear-programming × 10
quadratic-programming × 9
modeling × 8
integer-programming × 7
constraint × 7
reference-request × 6
gurobi × 6
convex-optimization × 6
convexity × 5
multi-objective-optimization × 5
kkt-conditions × 4
global-optimality × 4
constraint-programming × 3
binary-variable × 3
duality × 3
minlp × 3
open-source × 3