Is there a way to initialise a binary variable in C# using CPLEX ILOG Concert

119 Views Asked by At

A newbie to the the whole CPLEX ILOG Concert API user here who is trying to figure out how to implement this into a C# code.

I have tried to instantiate a variable as this:

INumExpr[,] x = new INumExpr[vVehicles.Length,rCustomerNodes.Length] ;

INumExpr[,,] y = new INumExpr[vVehicles.Length, rCustomerNodes.Length, rCustomerNodes.Length];

As a way to initialise the decision variables as such, but I also want to make the INumExpr as a boolean array and I dont know how to do that?

Please help .. Thanks :)

1

There are 1 best solutions below

0
On

INumVar[] open = cplex.BoolVarArray(nbLocations);

In the example Facility.cs in CPLEX_Studio221\cplex\examples\src\cs