Skip to main content

New answers tagged

2 votes

Constrained optimization with heuristic algorithm in actual production

Besides the mentioned answer, there are many cases in which either a simple rule or an algorithm, or a heuristic can solve a practical problem in an efficient manner and still without defining any ...
A.Omidi's user avatar
  • 8,960
2 votes

Constrained optimization with heuristic algorithm in actual production

For genetic algorithms, there is a variant called random key genetic algorithms (and a variant of that called biased random key genetic algorithms -- the bias part being a tweak to the evolutionary ...
prubin's user avatar
  • 39.6k
1 vote
Accepted

choose constraint from IIS to build penalty function

I think that, when selecting constraints to relax (with penalties), you should look at the IIS from the perspective of the final decision maker. Which constraints do they think absolutely must be ...
prubin's user avatar
  • 39.6k
1 vote

DOCPLEX Job Shop Scheduling In With Downtime

You can find and print the conflict by calling: print(mdl.refine_conflict()) You will see that Joe has 2 tasks to do of duration 1 and 7, and he only has 7 ...
Olivier Lhomme's user avatar
1 vote

If $x_1 \geq 4$ then **one** out of the following three constraints must hold: $x_2 \leq 3, x_3 \leq 4, x_4=5$

You can avoid several occurrences of $M$ as follows: \begin{align} x_1 &\leq 4 + Mz_1 \\ x_2 &\leq 3 + M(1-z_2) \\ x_3 &\leq 4 + M(1-z_3) \\ x_4 &\leq 5 + M(1-z_4) \\ x_4 &\geq 5 - ...
RobPratt's user avatar
  • 32.7k
4 votes
Accepted

How to avoid similar solutions?

You can add a continuous variable $h_i$ for each bucket $i$ to contain its "hash value", then constrain the hash values to be in nondecreasing order ($h_1 \le h_2 \le \dots$). The hash ...
prubin's user avatar
  • 39.6k
7 votes

How to avoid similar solutions?

you can order the variables: $x_1 \le x_2 \le x_3$
Laurent Perron's user avatar

Top 50 recent answers are included