Research

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Weighted Average into min objective

    6 answers - 333 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hello,
    I've this objective function to minimize the weighted average of d(j):
    min obj = sum(j,d(j)*w(j)*x(j)) / sum(j,w(j)*x(j))
    d(j) and w(j) are data
    x(j) is the unique decision variable.
    Any trick to transform the objective into a linear expression?
    many thanks
    JPC
  • No.1 | | 642 bytes | |

    JPC wrote:
    Hello,

    I've this objective function to minimize the weighted average of d(j):

    min obj = sum(j,d(j)*w(j)*x(j)) / sum(j,w(j)*x(j))

    d(j) and w(j) are data
    x(j) is the unique decision variable.
    --
    Any trick to transform the objective into a linear expression?

    many thanks
    JPC
    --

    The ratio is invariant under scaling of the x variable. *If* you know
    that the denominator has to be positive (you didn't say so, but it's
    typical in this type of problem), you could constrain the denominator to
    equal 1 and minimize the numerator.

    /Paul

  • No.2 | | 1439 bytes | |

    Thanks Paul.

    The denominator is always positive.

    I tried your idea but I get no feasible solution.

    Please, consider this example with only 3 elements i.e. j=1 to 3:

    D1 = 100 , W1= 1
    D2 = 200 , W2 = 2
    D3 = 300 , W3 = 3

    X1 5;

    the original NLP obj that gives me an optimal solution is:

    MIN = @SUM(ITEMSDATA: W * D * X ) / @SUM(ITEMSDATA: W * X ) ;

    Following your suggestion to linearize the obj, I added one constraint
    and changed the function:

    @SUM(ITEMSDATA: W * X ) = 1;

    MIN = @SUM(ITEMSDATA: W * D * X ) ;

    but now I get a "No feasible solution found"

    Any further help will be really appreciated!

    thanks again
    JPC

    Paul A. Rubin ha scritto:

    JPC wrote:
    Hello,

    I've this objective function to minimize the weighted average of d(j):

    min obj = sum(j,d(j)*w(j)*x(j)) / sum(j,w(j)*x(j))

    d(j) and w(j) are data
    x(j) is the unique decision variable.
    --
    Any trick to transform the objective into a linear expression?

    many thanks
    JPC
    >
    >
    >

    The ratio is invariant under scaling of the x variable. *If* you know
    that the denominator has to be positive (you didn't say so, but it's
    typical in this type of problem), you could constrain the denominator to
    equal 1 and minimize the numerator.

    /Paul

  • No.3 | | 1999 bytes | |

    I forgot to mention that there are also some constraints involving the
    x(j) decision variable (used in the weighted average) with other
    decision variables used in the MIN obj function:

    for example:

    x1 5;
    x1 + s1 >= 10;

    and the obj function is composed in a similar way:

    MIN =
    @SUM(ITEMSDATA: W * D * x ) / @SUM(ITEMSDATA: W * x )
    + @SUM(ITEMSDATA: s ) ;

    is still possible to linearize it?
    I tried but with no success

    JPC wrote:
    Thanks Paul.

    The denominator is always positive.

    I tried your idea but I get no feasible solution.

    Please, consider this example with only 3 elements i.e. j=1 to 3:

    D1 = 100 , W1= 1
    D2 = 200 , W2 = 2
    D3 = 300 , W3 = 3

    X1 5;

    the original NLP obj that gives me an optimal solution is:

    MIN = @SUM(ITEMSDATA: W * D * X ) / @SUM(ITEMSDATA: W * X ) ;
    --
    Following your suggestion to linearize the obj, I added one constraint
    and changed the function:

    @SUM(ITEMSDATA: W * X ) = 1;

    MIN = @SUM(ITEMSDATA: W * D * X ) ;
    --
    but now I get a "No feasible solution found"

    Any further help will be really appreciated!

    thanks again
    JPC
    >
    >
    >
    >
    >

    Paul A. Rubin ha scritto:

    JPC wrote:
    Hello,

    I've this objective function to minimize the weighted average of d(j):

    min obj = sum(j,d(j)*w(j)*x(j)) / sum(j,w(j)*x(j))

    d(j) and w(j) are data
    x(j) is the unique decision variable.
    --
    Any trick to transform the objective into a linear expression?

    many thanks
    JPC
    >
    >
    >

    The ratio is invariant under scaling of the x variable. *If* you know
    that the denominator has to be positive (you didn't say so, but it's
    typical in this type of problem), you could constrain the denominator to
    equal 1 and minimize the numerator.

    /Paul

  • No.4 | | 1167 bytes | |

    JPC wrote:
    I forgot to mention that there are also some constraints involving the
    x(j) decision variable (used in the weighted average) with other
    decision variables used in the MIN obj function:

    for example:

    x1 5;
    x1 + s1 >= 10;

    Well, that certainly makes a difference!
    and the obj function is composed in a similar way:

    MIN =
    @SUM(ITEMSDATA: W * D * x ) / @SUM(ITEMSDATA: W * x )
    + @SUM(ITEMSDATA: s ) ;
    --
    is still possible to linearize it?
    I tried but with no success

    I don't think so. There's a trick that would work with the new
    objective function and with separate constraints on x and s, or with x
    and s jointly constrained but no s terms in the objective, but if s is
    in the objective *and* x and s are jointly constrained, the trick fails
    (by producing either quadratic constraints or a nonlinear objective,
    depending on how you handle it.). The trick is described in section
    2.10.2 of the excellent book "Applications of optimization with
    Xpress-MP", which is available as a free download from Dash
    (www.dashoptimization.com).

    /Paul
  • No.5 | | 1300 bytes | |

    Thank you Paul,

    now I know that it is impossible to linearize my problem

    bye
    JPC

    Paul A. Rubin wrote:
    JPC wrote:
    I forgot to mention that there are also some constraints involving the
    x(j) decision variable (used in the weighted average) with other
    decision variables used in the MIN obj function:

    for example:

    x1 5;
    x1 + s1 >= 10;

    Well, that certainly makes a difference!
    and the obj function is composed in a similar way:

    MIN =
    @SUM(ITEMSDATA: W * D * x ) / @SUM(ITEMSDATA: W * x )
    + @SUM(ITEMSDATA: s ) ;
    --
    is still possible to linearize it?
    I tried but with no success

    I don't think so. There's a trick that would work with the new
    objective function and with separate constraints on x and s, or with x
    and s jointly constrained but no s terms in the objective, but if s is
    in the objective *and* x and s are jointly constrained, the trick fails
    (by producing either quadratic constraints or a nonlinear objective,
    depending on how you handle it.). The trick is described in section
    2.10.2 of the excellent book "Applications of optimization with
    Xpress-MP", which is available as a free download from Dash
    (www.dashoptimization.com).

    /Paul

  • No.6 | | 600 bytes | |

    JPC wrote:
    Hello,

    I've this objective function to minimize the weighted average of d(j):

    min obj = sum(j,d(j)*w(j)*x(j)) / sum(j,w(j)*x(j))

    d(j) and w(j) are data
    x(j) is the unique decision variable.
    --
    Any trick to transform the objective into a linear expression?

    No, but it is just a standard fractional linear programming problem.
    Methods of solution have been around for about 50 years. Do a Google
    search on "fractional linear programming", and you will see numerous
    papers.

    R.G. Vickson

    many thanks
    JPC

Re: Weighted Average into min objective


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 5 =
QUESTION ON "Research"

EMSDN.COM