@klon: What do you mean by maximizing the number of integers? If you are solving a MIP, all of the variables, which are defined to be integers, are going to be integers in the optimal solution (provided that the model is solved correctly). So, I don't see any point in maximizing the number of integers.

To maximize the integrality, you can replace each original continuous variable \(x\) with \(y+z\), where \(y\) is an integer variable and \(z\) is a nonnegative continuous variable. Then your objective is to minimize the sum of the \(z\) variables. You can explicitly put an upper bound of 1 on \(z\), but that will happen naturally due to the objective. Your LP now becomes a MILP with twice as many variables, but no linearization is required.

Yes, it minimizes the total fractionality. To minimize instead the number of fractional variables, you can introduce binary variable \(w\), together with big-M constraint \(z \le w\), and minimize the sum of the \(w\) variables.

General problem first: two objective functions, so you will typically "weigh" the two objectives and mingle them into one objective (unless you embark on multi-objective optimization and seek Pareto-optimal solutions).

The objective function could be expressed using additional integer variables z_i (one for each of your original continous variables x_i) and minimize their (absolute) difference |x_i-z_i|; you may need to linearize this using additional techniques.

Is this what you need? Will make your problem harder to solve, though.

Thanks. This sounds like a way forward, but may turn out to be to computationally expensive. I am looking at optimizing as many variables as possible to be binary. What constraints should I place on z_i? Can you clarify with an example?

Users tend to like the idea of weighting objective measures into one model. It's (in theory) easy and from a computationally side it also sounds better. Merging objective measures may work fine in many applications, but I have also often seen models formulated into one, with the users not knowing it was in fact a multi objective model to begin with or at least didn't sit down and think it through. Often the different objective criteria is very different, impacts the model and solution in completely different ways. I often suggest to build a model to be solved in several steps, before starting to merge objectives. This gives the advantage of better control and provides insight into the model effects. If that's too slow or otherwise doesn't work out, then by all means go for the weighted approach.

Add two binary variables \(y_i\) and \(z_i\) to indicate if \(x_i\) is 0 or 1, and add the constraints \(x_i \leq 1-y_i\) and \(x_i \geq z_i\). Maximizing \(\sum_i (y_i + z_i)\) will maximize the number of number of binary \(x_i\).

OR-Exchange is in "maintenance mode" (no posting of questions or comments, no new registrations) indefinitely due to heavy spamming. Meanwhile, a new site for OR questions is in beta testing: Operations Research Stack Exchange. This site will be maintained in read-only mode, allowing you to search it. Please consider directing any new questions to the Stack Exchange site.