model for the permutation flow shop problem
More...
Go to the source code of this file.
|
|
int | n = 15 |
| |
|
int | m = 10 |
| |
|
| p = make_data(n,m) |
| |
|
| model = permutation_flow_shop(n,m,p) |
| |
|
| x |
| |
|
| s |
| |
|
| f |
| |
| list | seq = [j for (k,j) in sorted([(k,j) for (j,k) in x if model.getVal(x[j,k]) > 0.5])] |
| | for (j,k) in sorted(x): if x[j,k].X > 0.5: print(x[j,k].VarName,x[j,k].X More...
|
| |
model for the permutation flow shop problem
Definition in file pfs.py.
creates example data set
Definition at line 63 of file pfs.py.
| def pfs.make_data |
( |
|
n, |
|
|
|
m |
|
) |
| |
make_data: prepare matrix of m times n random processing times
Definition at line 54 of file pfs.py.
| def pfs.permutation_flow_shop |
( |
|
n, |
|
|
|
m, |
|
|
|
p |
|
) |
| |
gpp -- model for the graph partitioning problem
Parameters:
- n: number of jobs
- m: number of machines
- p[i,j]: processing time of job i on machine j
Returns a model, ready to be solved.
Definition at line 14 of file pfs.py.
| list seq = [j for (k,j) in sorted([(k,j) for (j,k) in x if model.getVal(x[j,k]) > 0.5])] |
for (j,k) in sorted(x): if x[j,k].X > 0.5: print(x[j,k].VarName,x[j,k].X
for i in sorted(s): print(s[i].VarName,s[i].X
for i in sorted(f): print(f[i].VarName,f[i].X
Definition at line 105 of file pfs.py.