Ah, I have implemented it in the wrong way. I now see what you meant. Thanks a lot!

Adding the variableÂ vnew plus the two constraints cannot induce an infeasibility (because CPLEX can just increase vnewÂ indefinitely to make these two constraints feasible)Â so it seems to me that the infeasibility is caused by something else. To findÂ the cause of the infeasibility you should switch on the Solvers General option 'Infeasibility Finderâ€™ and solve the model. AIMMS will then print anÂ irreducible infeasibility set in the listing file (in the log folder) which you should analyze to find the cause.

I missed the 'iâ€™ inside the sum. Is that an index? If so then vnew(a,t) should becomeÂ vnew(a,t,i). (This will not resolve theÂ infeasibility.)

Dear Marcel,

Â

Thank you for the reply. Unfortunately, it does not work. AIMMS gives that after zero iterations an integer solution to this problem does not exist (I think since vnew takes a negative value in all circumstances, which is good, since that is what I want to achieve, but then the value in the objective for vnew should take 0, instead of an infeasible solution..). I hope you can help me!

If you are minimizing then it suffices to add the following two constraints:

Â

vnew(a,t) >=Â sumup, x(a,p,t) * (M(a,p) - 1)] - w(a,t) - h(a) - i]

vnew(a,t) >= 0

Â

withÂ **sum( (a,t), vnew(a,t) )**Â added to the objective. (You only need to add the first constraint if you define vnew as a nonnegative variable.)

I would indeed like what you have in your vnew construction. So, vnew is 0 if the sum gives a negative value and vnew is the value of the sum if this is positive.The optimization direction of the math program is minimization. I hope my question is clear now :)

Hi @Anne2Â I am afraid that your question is not entirely clear. Why is there a ",0"Â part in theÂ sum:

Â

Â sum p, x(a,p,t) * (M(a,p) - 1)] - w(a,t) + - h(a) - i**,0**]Â ?

Â

Do you want to model something like:

Â

Â vnew(a,t) =Â max( sumÂp, x(a,p,t) * (M(a,p) - 1)] - w(a,t) - h(a) - i], 0 )

Â

and then use **sum( (a,t), vnew(a,t) )**Â in the objective?

Â

What is the optimization direction of the math program: minimization or maximization?