Originally posted by: aysenur
Hi,
Thank you for the response. Apparently I mistakenly wrote .Converter() instead of .Conversion(), that is what I meant. But still I was using it wrong in the sense that I wasn't adding it to my model. Thank you for directing me to the example, that really helped me understand how to use it. On a side note is it possible to add this to the Cplex documentation? When I read about using the .Conversion(), I didn't see a reference to an example, that would save a lot of trouble.
That being said I am still having trouble getting this to work. I have the following piece of code:
foreach(Pairp inPairsIn)
{foreach(Noden inSTIn.Nodes)
{foreach(VesselClassvc inVCIn)
{IConversionrelax = model.Conversion(ypnvc[PairsIn.IndexOf(p)][STIn.Nodes.IndexOf(n)][VCIn.IndexOf(vc)], NumVarType.Float);
model.Add(relax);
}}}
I am relaxing my variables one by one because I have 3-index variables and I didn't want to go through a loop to put them in an array. I checked model.NintVars field in debug mode to see what Cplex was doing inside the loop. And what I see is although it will decrease the number of integer variables in first several rounds, it will stop after a point. So I end up with a partially relaxed model. Maybe I am doing something wrong, should I put the variables in an array instead? Best.
#CPLEXOptimizers#DecisionOptimization