PySCIPOpt
Python Interface to the SCIP Optimization Suite
mkp.py File Reference

model for the multi-constrained knapsack problem More...

Go to the source code of this file.

Functions

def mkp (I, J, v, a, b)
 
def example ()
 

Variables

 I
 
 J
 
 v = x[i]
 
 a
 
 b
 
 model = mkp(I,J,v,a,b)
 
 x = model.data
 
int EPS = 1
 

Detailed Description

model for the multi-constrained knapsack problem

Definition in file mkp.py.

Function Documentation

def mkp.example ( )
creates example data set

Definition at line 36 of file mkp.py.

def mkp.mkp (   I,
  J,
  v,
  a,
  b 
)
mkp -- model for solving the multi-constrained knapsack
Parameters:
    - I: set of dimensions
    - J: set of items
    - v[j]: value of item j
    - a[i,j]: weight of item j on dimension i
    - b[i]: capacity of knapsack on dimension i
Returns a model, ready to be solved.

Definition at line 8 of file mkp.py.