Reputation: 49
Please help me if anyone can solve this problem, and I would be so appreciated. If there is a vehicle which can transport the material from machine 1 to machine 2 or from machine 4 to machine 3, which means there are two optional intervals (named V12 and V43) for this interval(named V) to choose. However, if the preceding operation interval was operated on machine 1 and the following operation interval was operated on machine 2, only V12 can be chosen as the alternative interval. That means, I need to make a constraint like
if (presenceOf(V12)) =>
presenceOf(operation[x][1].machine==1) && presenceOf(operation[x][2].machine == 2)
Upvotes: 0
Views: 278
Reputation: 10059
in C# you do not have operator overloading so you should rely on
and so on
See example foodmanufact.cs in CPLEX_Studio1210\cplex\examples\src\cs
FoodManufact.cs implements a solution to the food production planning problem, well known from the modeling textbook of H. P. Williams.
If you want to call OPL from C# you may have a look at the examples in
CPLEX_Studio1210\opl\examples\opl_interfaces\dotnet
Upvotes: 1