JaCoP / BinaryIntegerProgramming / 0.1.0

This is an algorithm for binary integer programming (also known as 0-1 integer programming) built on the JaCoP Constraint Programming Solver (https://github.com/radsz/jacop). Binary integer programming is a restriction of integer programming in which variables are limited to being either 0 or 1. Read more about integer programming at https://en.wikipedia.org/wiki/Integer_programming. It's arguments are
  1. A String array of variable names
  2. An int vector c defining the cost of the returned solution via c^(T)x.
  3. An int matrix (int[][]) that defines the matrix part of the linear constraints
  4. A String array denoting the nature of each constraint, either "<",">","<=", or ">=".
  5. An int array (in[]) defining the right hand side of the linear constraints.
The output is a Map<String,Int> containing each variable name as key and its value in the found solution as value.  

Note that this implementation is minimizing and uses branch-and-bound, which is to say, it minimizes c^(T)x. To maximize, change the signs of the integers in c.  For more information consult the JaCoP documentation at http://jacopguide.osolpro.com/guideJaCoP.html#x1-510006.