New answers tagged optimization
1
vote
How to Set Up an Optimization Problem Like the 0/1 Knapsack
You can certainly model this as a binary integer program. The constraints are very straightforward, and either filling the maximum number of fields or (equivalently) maximizing the number of words ...
- 35.6k
2
votes
Quantifying a measure of standard deviation in MILP
Why not try to calculate the overall required operators at each shift or any specific period of time, weekly/monthly, as a predefined parameter, in the best case, for each of $N$ parts, and ...
- 7,366
3
votes
Quantifying a measure of standard deviation in MILP
Similar to above answer, you can avoid quadratic objective by summing up absolute deviation from the mean with:
$ \vert S \vert w_s - \sum_s w_s \le \vert S \vert z$
$ \sum_s w_s - \vert S \vert w_s \...
- 2,680
5
votes
Accepted
Quantifying a measure of standard deviation in MILP
A couple of options come to mind. Let $w_s$ be a variable representing the number of workers during shift $s.$ You can introduce nonnegative variables $y$ and $z$ to represent the minimum and maximum ...
- 35.6k
4
votes
use Forecast distribution width in inventory optimization
Here are three distinct fields of research, any of which might (or might not) be useful to you.
Robust optimization deals with uncertainty in the parameters of an optimization model by focusing on ...
- 35.6k
1
vote
How to implement tiered pricing based on weight or cube volume or order amount total into objective function with Guro i py
Yes, if-then-else with indicator constraints will work.
If you may linearize, here's the suggestion
Suppose $0 \le x_{v,d,m,u,w,c} \in Z$ is integer number of items $u$ ordered from vendor $v$ DC, of ...
- 2,680
2
votes
Armijo Line Search Parameters
You are correct that the optimal choice of parameters for the Armijo line search can vary depending on the problem and the optimization algorithm being used. In practice, there are several common ...
- 186
1
vote
Array of string in OPL
.mod
{string} cluster=...;
string darkstore [cluster][1..4]=...;
string demandpoint [cluster][1..4]=...;
.dat
...
- 3,982
1
vote
Fixing binary variables in an Binary Integer Program
Actually, it effectively depends on the problem you have at hand. Modern solvers have often been armed with dozen of (SOTA) heuristics, cutting plane approaches, powerful pre-solving phases, etc. Also,...
- 7,366
0
votes
Fixing binary variables in an Binary Integer Program
There are approaches like this, kind of heuristic you may say, where you can fix values of some variables like a warm start and allow the solver to start search from the given feasible candidate ...
- 2,680
0
votes
Accepted
Optimization solver that satisfies variable values within set membership
MINLP (Mixed-Integer Non-Linear Problem) solvers can process the optimization predicate of the question I asked of which Bonmin and Couenne are two FOSS examples, both natively supported in AMPL.
For ...
2
votes
Accepted
What's the suitable optimization model for solving the given model?
We can eliminate a few variables and rewrite the problem as follows:
\begin{align*}
\max\lambda_{a}-\beta\left[\sum_{j}\left(w_{j}-\sigma_{j}^{N}\right)^{2}+\sum_{j}\left(w_{j}-\pi_{j}^{N}\right)^{2}\...
- 35.6k
1
vote
How to perform clustering of a large number of nodes?
This is the graph partitioning problem. In your formulation, you are trying to maximize the weight of edges that are inside a cluster, instead of minimizing the weight of edges between clusters, but ...
- 1,722
0
votes
How to perform clustering of a large number of nodes?
If you would like to maximize intra-cluster weight, firstly, subtract each edge weight from 1. On the resulting graph, solve a Minimum Spanning Tree (MST). If you would like 2 clusters, remove the ...
- 151
1
vote
How to perform clustering of a large number of nodes?
You can apply a genetic algorithm to the problem, although (a) I'm not sure it would be considered "less-complex" and (b) it definitely would have a random component, with different runs ...
- 35.6k
0
votes
Reformulate this constraint optimization problem such that I do not have to divide 2 variables?
You can define a parameter $\tau_t= 1$ if tasks $t$ is from set A, -1 otherwise. In that case your $ m_{t,d}=1$ if task $t$ is assigned on day $d$, becomes a binary. you can use $ \sum_t \tau_t m_{t,d}...
- 2,680
0
votes
Reformulate this constraint optimization problem such that I do not have to divide 2 variables?
You could try implementing the condition $x * y = z$ by expanding $x$, $y$, and $z$ as binary vectors $x^b$, $y^b$,$z^b$. I.e. $\Sigma x^b = \Sigma y^b = \Sigma z^b = 1$, $z^b_{i \cdot j} >= x^b_i +...
- 133
1
vote
How to perform clustering of a large number of nodes?
Here's a simple hill-climbing approximate solver in Python which seems to work quite well:
...
- 133
1
vote
Optimization solver that satisfies variable values within set membership
AMPL automatically linearizes var purchase {CUSTOMER} in VALUE; where VALUE is a set of numbers. The linearization creates some ...
- 618
0
votes
Optimization solver that satisfies variable values within set membership
Define a set like $I= \{0,5,6,...100\}$ and a binary $z_i$.
Add constraints:
$ \sum_{i\in I} iz_{i,k} = 100p_k$ where $p$ is purchase variable for k customers
$ \sum_{i\in I} z_{i,k} = 1$
Above 2 will ...
- 2,680
1
vote
Converting a piecewise function to a linear equation as a constraint
For the if statements try this
$x_1-(x_2+x_3) \le w_1$
$x_2-x_3 \le w_2 $
$x_3 \le w_3 $
$ w_1 +w_2+w_3 =1$
where $w$ are binary.
$\alpha = 100w_1 +200w_2 + 300w_3 $
As question now stands I d modify ...
- 2,680
0
votes
Modelling with Gurobi-Python a Supply Chain Problem
Sample variable declaration and use in expressions or constraints\
...
- 2,680
1
vote
Modelling with Gurobi-Python a Supply Chain Problem
One possible way is by defining each part of the objective function separately and finally collecting them in an objective method. For example, suppose there are two different terms in the object as $\...
- 7,366
0
votes
How to find the maximizing number of expected delivered units of a probabilistic minimum cost flow problem?
This open-source software solver can handle stochastic programming problems, including the scenario approach. PySP is a python based modeling framework for stochastic programming that allows us to ...
0
votes
GUI Optimization tool for business users
AIMMS could be a viable solution (depending on the number of users and budget) for building interactive GUI for optimization problems.
Top 50 recent answers are included
Related Tags
optimization × 896mixed-integer-programming × 174
linear-programming × 167
modeling × 117
python × 105
integer-programming × 73
combinatorial-optimization × 73
nonlinear-programming × 58
constraint × 57
convex-optimization × 55
gurobi × 48
reference-request × 45
scheduling × 45
solver × 40
linearization × 36
pyomo × 33
cplex × 32
quadratic-programming × 31
constraint-programming × 29
algorithms × 25
network-flow × 23
graphs × 21
assignment-problem × 21
multi-objective-optimization × 20
binary-variable × 18