I am new to Cplex. I'm solving an integer programming problem, but I have a problem with objective function. Problem is that I have some project, that have a due date D, and if project is tardy, than I have a tardiness penalty b, so it looks like b*(cn-D). Where cn is a real complection time of a project, and it is decision variable.
It must look like this
if (cn-D)>=0 then b*(cn-D)==0
I tried to use "if-then" constraint, but seems that it isn't working with decision variable. I looked on question similar to this, but but could not find solution. Please, help me define correct objective function.