I am trying to use the Microsoft Solver Foundation to optimize a problem with a matrix of binary decision variables. Here is the format of my decision matrix:
X[i,j] =
{
{ x11, x12, ..., x1n },
{ x21, x22, ..., x2n },
...
{ xm1, xm2, ..., xmn },
};
I also have a vector of parameters, which is dependent on Xij matrix (each element of the vector is sum of one column of Xij:
Y[i] =
{
Sum(x11, x21, ..., xm1), Sum(x12, x22, ..., xm2), ..., Sum(x1n, x2n, ..., xmn)
}
I know that i should work with indexed Decision objects, but I have trouble doing that. Could anyone please help me. I understand there is two ways of indexing Decisions:
Decision Xij = new Decision(Domain.Any, "x", Some Set, Some other set);
and also there's:
`Decision[,] = new Decsion [i, j];`
What's the difference?