I need to write an integer program. It's incredibly simple, but the problem is there is next to no good information on how to write integer programs for GLPK using the callable library, let alone for GLPK#.
My integer program looks very much like this:
Maximise: X[0] + X[1] + ... + X[n];
s.t. X[1] + X[5] <= 1;
X[1] + X[7] <= 1;
X[2] + X[4] <= 1;
X[3] + X[9] <= 1;
...
X[i] = {0,1}
I have a bunch of binary X's, and I want to maximise the sum. Certain X's preclude certain other X's.
All I've managed to do so far is
LPProblem lp = new LPProblem()
{
ModelClass = MODELCLASS.MIP,
ObjectiveDirection = OptimisationDirection.MAXIMISE,
ObjectiveName = "Z"
};
// Stuff goes here, I'm not sure how to represent the model
SOLVERSTATUS status = lp.SolveInteger();