Module SCOPExample
[hide private]
[frames] | no frames]

Module SCOPExample

source code

Functions [hide private]
 
assign1()
assign1.py: Using SCOP for solving an assignment problem Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2011
source code
 
assign2()
assign2.py: Using SCOP for solving an assignment problem under linear constraints.
source code
 
assign3()
assign3.py: Using SCOP for solving an assignment problem under a quadratic constraint.
source code
Variables [hide private]
  __package__ = None
Function Details [hide private]

assign1()

source code 

assign1.py:
Using SCOP for solving an assignment problem
Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2011

Example 1 (Assignment Problem):
Three jobs (0,1,2) must be assigned to three workers (A,B,C)
so that each job is assigned to exactly one worker.
The cost matrix is represented by the list of lists
Cost=[[15, 20, 30],
      [7, 15, 12],
      [25,10,13]],
where rows of the matrix are workers, and columns are jobs. 
Find the minimum cost assignment of workers to jobs.

assign2()

source code 

assign2.py: Using SCOP for solving an assignment problem under linear constraints. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2011

Example 2 (Generalized Assignment Problem): Three jobs (0,1,2) must be assigned to five workers (A,B,C,D,E). The numbers of workers that must be assigned to jobs 0,1 and 2 are 1,1 and 2, respectively. The cost matrix is represented by the list of lists Cost=[[15, 20, 30], [7, 15, 12], [25,10,13], [15,18,3], [5,12,17]] where rows are workers, and columns are jobs. Find the minimum cost assignment of workers to jobs.

assign3()

source code 

assign3.py: Using SCOP for solving an assignment problem under a quadratic constraint. Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2011

Example 3 (Variation of Generalized Assignment Problem): Three jobs (0,1,2) must be assigned to five workers (A,B,C,D,E). The numbers of workers that must be assigned to jobs 0,1 and 2 are 1,1 and 2, respectively. The cost matrix is represented by the list of lists Cost=[[15, 20, 30], [7, 15, 12], [25,10,13], [15,18,3], [5,12,17]] where rows are workers, and columns are jobs. We add an additional condition: worker A cannot do the job with worker C. Find the minimum cost assignment of workers to jobs.