Originally posted by: ZhangShixuan
Hi,
I ran into a problem modelling with Cplex 12.6.1, using concert technology with VS2010. I was modelling a network which cplex failed to optimize, so I started debugging by deleting all the constraints and adding them again one by one to make sure every of them works well. Everything was good until I added a constraint with IloPiecewise function:
model.add(IloPiecewiseLinear(I[i][j], -IloInfinity, ILog.PointArray, ILog.ValueArray, IloInfinity) ==
2 * IloPiecewiseLinear(q[i][j], -IloInfinity, qLog.PointArray, qLog.ValueArray, IloInfinity) -
IloPiecewiseLinear(p_t[i][p_out[j]], -IloInfinity, ptLog.PointArray, ptLog.ValueArray, IloInfinity) +
IloLog(ConstI[j]));
where i, j are simply the array indices and the variables I, q, p_t are already bound by their range constraints. ILog, qLog and ptLog are the classes providing the necessary points and values for these piecewise linear functions. The error message said that 'no solution exists' and the status was also 'infeasible'. Moreover, there was a warning "Bound infeasibility column: p_t[0](1)" (a variable on the rhs of this piecewise linear constraint). However, if I use the interactive optimizer with .sav file, I got the solution successfully as I had expected because those variables were actually not bound by any other constraint than this one and the range.
Therefore, I am now extremely puzzled by the different results brought by the C++ api and interactive optimizer. I would appreciate it very much if anyone could give some idea of this problem. Thanks a lot!
#CPLEXOptimizers#DecisionOptimization