Quantcast
Channel: Yet Another Math Programming Consultant
Viewing all articles
Browse latest Browse all 809

Two nonlinear formulations

$
0
0
Problem Description

From: http://math.stackexchange.com/questions/1652150/turn-off-the-ovens-an-optimization-problem:

image 

I am not at all sure the physics make sense, but lets fox on the mathematics of this model.

Formulation A

An MINLP formulation could be:

The idea is:

  • If yi=0 (oven is turned off) we force xi=0 (equation Off). Also we have lossi=0 as we multiplied the loss function by yi.
  • If yi=1 (oven is turned on), we let the solver decide on xi. In almost all cases it will choose a value > 0 as it wants to be somewhat close to ai.
  • We don’t have to model explicitly xi=0 => yi=0. If xi=0 then the objective would have a preference for yi=0 as this will improve the objective.

This model is no longer quadratic. For small instances like this we can use a global solver without a problem.

image

Formulation B

If we can make the problem quadratic and convex we can solve the problem with many more solvers. So here is a formulation that does just that:

Here we have:

  • If yi=0 (oven is turned off) we force xi=0 (equation Off).  The slack si is left floating. This will cause the algorithm to choose a slack such that the loss is zero.
  • If yi=1 (oven is turned on) we force si=0 (equations On1,On2).

As this model is convex all MIQP solvers can handle this.


Viewing all articles
Browse latest Browse all 809

Trending Articles