Skip to main content

New answers tagged

1 vote

Most constraining constraint CP-SAT

You could do this inside one model. $$\begin{aligned} \min\> & 3x+5y \\ & \delta_1 = 1 \implies x \ge 1 \\ & \delta_1 = 1 \implies y \ge 1 \\ & \delta_2 = 1 \implies x+y \ge 3 \\ &...
Erwin Kalvelagen's user avatar
1 vote

Most constraining constraint CP-SAT

This may make sense in a linear problem with the LP relaxation, but this makes no sense in general with a CP-SAT problem, in particular scheduling. The only option would be remove the constraint, and ...
Laurent Perron's user avatar
3 votes
Accepted

How to reset hints in a CP-SAT model?

You don't specify any specific interface and usage might be somewhat different, but looking into the python sources: ...
sascha's user avatar
  • 641
0 votes

How to request shifts when nurses _don't_ work

If choices/preferences is a given like nurse-day-shift you can define a pre-set parameter $p_{n,ds}$ where $ds$ can be a single index for day-shift combo (just to make it compact). Also $p_{n,ds}=1$ ...
Sutanu Majumdar's user avatar
2 votes

Job Shop Scheduling with Multiple possible machines for a task in CP-SAT

It is called flexible job shop, and there is an example called flexible_jobshop_sat.py that implements it. https://github.com/google/or-tools/blob/stable/examples/python/flexible_job_shop_sat.py
Laurent Perron's user avatar
0 votes

Convert sequence to succession matrix with CP-SAT

Based on the suggestion, i came up with this, which seems to work. X[i] is the order of integers with elements i Z[j,k] is the succesion matrix, i.e. if j is followed by k ...
QuestioningPanda's user avatar
1 vote

How to request shifts when nurses _don't_ work

You can have a look at the shift_scheduling_sat example. The first idea is to create an 'off' shift. From there, the example supports both types of requests: nurse prefer this assignment (including ...
Laurent Perron's user avatar
1 vote

Convert sequence to succession matrix with CP-SAT

Your matrix has n X n entries, you will need n x n x 2 Boolean variables. One nxn matrix of variables for the mapping of integer variables to Boolean variables, and another matrix for the result (...
Laurent Perron's user avatar

Top 50 recent answers are included