Skip to content

Commit

Permalink
Merge pull request #5 from dwave-examples/update/minor-improvements
Browse files Browse the repository at this point in the history
Minor Improvements
  • Loading branch information
k8culver authored Jul 5, 2024
2 parents f2b5522 + 7d168c3 commit ce316a8
Show file tree
Hide file tree
Showing 12 changed files with 550 additions and 462 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Open in GitHub Codespaces](
https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-333?logo=github)](
https://codespaces.new/dwave-examples/flow-shop-scheduling-nl?quickstart=1)
https://codespaces.new/dwave-examples/flow-shop-scheduling?quickstart=1)

# Flow Shop Scheduling
[Job shop scheduling](https://en.wikipedia.org/wiki/Job-shop_scheduling) (JSS) is an optimization problem with the goal of scheduling, on a number of machines, jobs with diverse orderings of processing on the machines. The objective is to minimize the schedule length, also called "make-span," or completion time of the last task of all jobs. [Flow shop scheduling](https://en.wikipedia.org/wiki/Flow-shop_scheduling) (FSS) is a constrained case of JSS where every job uses every machine in the same order. The machines in FSS problems can often be seen as sequential operations to be executed on each job, as is the case in this particular demo.
[Job shop scheduling](https://en.wikipedia.org/wiki/Job-shop_scheduling) (JSS) is an optimization problem with the goal of scheduling, on a number of machines, jobs with diverse orderings of processing on the machines. The objective is to minimize the schedule length, also called "makespan," or completion time of the last task of all jobs. [Flow shop scheduling](https://en.wikipedia.org/wiki/Flow-shop_scheduling) (FSS) is a constrained case of JSS where every job uses every machine in the same order. The machines in FSS problems can often be seen as sequential operations to be executed on each job, as is the case in this particular demo.

![Demo Screenshot](_static/screenshot.png)

Expand Down Expand Up @@ -65,19 +65,19 @@ These are the parameters of the problem:
- `M_(j,t)`: the machine that processes task `t` of job `j`
- `T_(j,i)`: the task that is processed by machine `i` for job `j`
- `D_(j,t)`: the processing duration that task `t` needs for job `j`
- `V`: maximum possible make-span
- `V`: maximum possible makespan

### Variables

- `w`: a positive integer variable that defines the completion time (make-span)
- `w`: a positive integer variable that defines the completion time (makespan)
of the JSS
- `x_(j_i)`: positive integer variables used to model start of each job `j` on
machine `i`
- `y_(j_k,i)`: binaries which define if job `k` precedes job `j` on machine `i`

### Objective

The objective is to minimize the make-span (`w`) of the given FSS problem.
The objective is to minimize the makespan (`w`) of the given FSS problem.

### Nonlinear Model

Expand All @@ -102,7 +102,7 @@ Above: a solution to a flow shop scheduling problem with 3 jobs on 3 machines.
![fss_example1](_static/fss_example1.png)
Above: an improved solution to the same problem with a permutated job order.

### Constraint Quadratic Model
### Constrained Quadratic Model
The constrained quadratic model (CQM) requires adding a set of constraints to ensure that tasks
are executed in order and that no single machine is used by different jobs at the same time.

Expand Down Expand Up @@ -134,7 +134,7 @@ There are two cases:
![equation2_2](_static/eq2_2.png)
Since these equations are applied to every pair of jobs, they guarantee that the jobs don't overlap on a machine.

#### Make-Span Constraint
#### Makespan Constraint
In this demonstration, the maximum makespan can be defined by the user or it will be determined using a greedy heuristic. Placing an upper bound on the makespan improves the performance of the D-Wave sampler; however, if the upper bound is too low then the sampler may fail to find a feasible solution.


Expand Down
Loading

0 comments on commit ce316a8

Please sign in to comment.