I’m trying to put an exponential ponderation to the “absolute” variable (the point of the code is putting students in a class. A class can have more or less student than an ideal class size, but the further away that number is from the ideal size the more it should weight so that the minimum function will favour a number of student around the ideal-class size).
As i have to use Linear Programming, i can’t put directly abs2(absolute) to get the value sqared. I’m then trying to go around that problem.
Do you think there’s a way to make it work somehow?
You should start writing your formulation in terms of equations.
You cant start with a regular absolute value penalty, and from that you can evolve to a piecewise linear penalty.
I’m sorry, could you elaborate on the equation part ?
Do you mean put an equation in the objective value ?
My main problem here is that the penality (what was in my dictionnary) depends directly from the value that the variable takes. I can’t put in advance that, for example, absolute[1] has to be multiplied by x.
Thanks!