Most Popular

1500 questions
5
votes
2 answers

VRP package for R

I work almost exclusively in R and Rstudio, and have found it to be an excellent ecosystem for data analysis and OR, including discrete event simulation, Monte Carlo simulation, MILP, and the Traveling Salesman Problem. The ONLY gap I see is, no…
Ralph
  • 371
  • 2
  • 5
5
votes
1 answer

Single KKT solution for a simple problem: proof of being minimizer

I have a very simple problem: $$ \begin{align*} \begin{array}{ll} \min\limits_{x_1,x_2} & -x_1x_2 \\ \text{s.t.} & x_1 + x_2 - 2 = 0. \end{array} \end{align*} $$ The KKT system gives me $x_1^* = x_2^* = \lambda^* = 1$ where the $*$ denotes the KKT…
independentvariable
  • 3,980
  • 10
  • 36
5
votes
2 answers

Integer programming problem

I have the following exercise: Stockco is considering four investments. Investment 1 will yield a net present value (NPV) of \$16,000; investment 2, an NPV of \$22,000; investment 3, an NPV of \$12,000; and investment 4, an NPV of \$8,000. Each…
Slim Shady
  • 107
  • 14
5
votes
1 answer

How is Big M calculated?

Because of excessive pollution on the Momiss River, the state of Momiss is going to build pollution control stations. Three sites (1, 2, and 3) are under consideration. Momiss is interested in controlling the pollution levels of two pollutants (1…
Slim Shady
  • 107
  • 14
5
votes
0 answers

Understanding HardRouteConstraint

I am trying to understand the route constraints in jsprit. While I got the concept of HardActivityConstraint, I am unable to have clarity on HardRouteConstraint. Can someone, preferably with a simple example explain to me how it works, what is its…
Aman Kumar
  • 139
  • 1
5
votes
2 answers

Solving a non-linear non-convex mixed-integer program

The optimization problem that I am dealing with is very similar to this example. In brief, I have some decision variables that can take real values with lower/upper bounds, and some other variables that are constrained to be integers (which are then…
V-Red
  • 239
  • 1
  • 4
5
votes
1 answer

Precedence constraints using binary variables - DOCPLEX

I would like to establish a precedence constraint to ensure the precedence relation of tasks. I have a set of tasks available, but required tasks are not always the same. It means, the tasks executed will depend of the demand. When I searched for…
campioni
  • 1,133
  • 5
  • 13
5
votes
1 answer

Solving a variant of multiple knapsack problem/ generalized assignment problem

Consider $m$ knapsack and $n$ items. With each knapsack $j$ associated a capacity $c(j)$ and with each item $i$ associated a profit $p(i,j)$ (that depends on the knapsack, so it's not exactly the classic multiple knapsack problem) and a weight…
Joffrey L.
  • 963
  • 6
  • 14
5
votes
1 answer

Scheduling with transition costs - DOCPLEX

I am dealing with a kind of scheduling problem. I have a set of tasks to be executed by a set of machines. It is known that different machines are able to execute the same task, but each machine can execute one task at time. The cost of executing…
campioni
  • 1,133
  • 5
  • 13
5
votes
4 answers

Reference request for Evacuation Planning

I have been assigned to make a literature review on evacuation planning. Could you please suggest some papers that I can use for the review?
5
votes
1 answer

Minimisation of shelving cost problem

A library must build shelving to shelve $200$ 4-inch high books, $100$ 8-inch high books, and $80$ 12-inch high books. Each book is 0.5-inch thick. The library has several ways to store books. For example, an 8-inch high shelf may be built to store…
Slim Shady
  • 107
  • 14
5
votes
0 answers

What's the expected number of subsets of iid random variables with sum in given range?

Suppose $X_1,\ldots,X_n$ are drawn i.i.d from a uniform distribution on $[0,1]$ and let $x$ be the random vector $(X_1,\ldots,X_n)$. Then consider the random variable $Y_v = v^\top x $ for all $v \in \{0,1\}^n$ — note there are $2^n$ such random…
ydubey7
  • 579
  • 2
  • 9
5
votes
0 answers

Magic square in AMPL: presolve: constraint cannot hold

I'm solving the magic square problem without using the alldiff operator. To insert different values ​​in the matrix, I initialized a variable: var y {1..n, 1..n, 1..n * n} binary; where y[i,j,k] will equal 1 if and only if entry i, j in the matrix…
Matteo
  • 223
  • 1
  • 6
5
votes
0 answers

How to handle constraints in docplex to states the relation between two variables?

I am using docplex.cp and I need to state the following constraint: $$\sum_{c}(X_p{_w}_{cj}+X_{p+1}{_{w'}}_{cj+1})\leqslant T_w{_{w'}}_{,jj+1} + 1$$ Knowing that the binary variables are: $X_p{_w}_{cj}=1$ if an operation $p$ is done by a machine…
campioni
  • 1,133
  • 5
  • 13
5
votes
0 answers

In a binary logistic regression context, how to introduce a constraint to model the dependency between consecutive samples

Imagine we are running a logistic regression to identify opportunities for car sale promotion, using previous promotion campaign's result. Each $y$ is the increase of car sale after the promotion. However, there is a problem here: once we launch a…
eight3
  • 481
  • 2
  • 5