New answers tagged python
3
votes
Can docplex solve a mixed integer quadratic programming (MIQP) problem?
In OPL You can write
...
6
votes
How to put this restriction using Gurobi in python
Firstly, your constraint should rather look this this:
$$\sum_{j=0}^{i}X_j \leq H_i \quad \forall i \in I$$
$$\sum_{j=0}^{i}X_j \geq L_i \quad \forall i \in I$$
In your code this should translate to:
<...
2
votes
Accepted
How to formulate cumulative sum of LpVariable in Pulp Python
This is one way you can formulate/model the problem:
$$
\begin{align*}
x_{i,t} &\in R^{+} \text{ variable denoting amount of raw material $i$ processed/out in time $t$}\\
q_{i,t} &\in R^{+} \...
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
python × 249optimization × 76
pyomo × 52
gurobi × 46
mixed-integer-programming × 43
linear-programming × 34
pulp × 26
or-tools × 25
modeling × 24
cplex × 22
solver × 21
docplex × 17
integer-programming × 15
constraint × 15
constraint-programming × 15
scheduling × 12
nonlinear-programming × 11
vehicle-routing × 8
combinatorial-optimization × 7
traveling-salesman × 6
matlab × 6
cplex-python-api × 6
assignment-problem × 5
cvxpy × 5
quadratic-programming × 4