I am trying to resolve (With linear programming ) a Cutting stock problem.
There is one cost that i have not been able to calculate. if the amount of rod left after cutting (Y[i]) is 200 or less then is waste (S[i]) and i have to add the opportunity cost (S[i]*r). S[i] can take any value between 0 and 200.
The problem is that S[i] is becoming always 0 even though Y[i] < 200. Does anyone know why? I leave the chunk of code that is often used to solve this type of restriction.
-
problem += y[i] >= lenght_Rod[kassete.index(i)]- x[i] *
lengths_rod[kassete.index(i)] -
problem += s[i] >= 200* bs[i]
-
problem += y[i] >= s[i] – M*(1- bs[i])
I would really appreciate if someone could give me a tip or advice that i can use for the solution.
Thank you everyone
I was wondering if i should relate the variable S[i] in a previous constrain
John Sebastian Orjuela Pico is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.