I am using the Java wrapper for LPsolve and I have a cost function with the traditional initial fixed cost + operating costs in the cost function
How can I add this constraint that if y_i = 0, p_i must also be zero (with y_i being the initial purchase cost, i.e. binary variable whether or not I choose it, and p_i the amount produced)?
I am aware I could technically use less or equal to statements to mimic this behavior, however this adds potential extra optima.
Adding a less or equal to constraint does indeed solve the issue, using a sufficiently high upper bound. The added extrema are irrelevant and will never be an optimum as Erwin stated.