help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Can GLPK for JAVA solve multi-objective optimization pro


From: Xypron
Subject: Re: [Help-glpk] Can GLPK for JAVA solve multi-objective optimization problem?
Date: Wed, 01 Sep 2010 21:19:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Yi,

In your optimization problem quadratic terms my(k) * my(k) appear. GLPK can only solve linear problems.

Hence if you want to use GLPK you will have to change the formulation a bit. Below I give a description in GMPL which you could use with the standalone solver glpsol:

param H; # replaces H_p - 1
set K := {0..H};
set I := {0..10};
param c{K};
param t{I}; # t replaces the term (T_in[K] - T_ref)^ 2
var  x[K,I], binary;

minimize obj :
sum{k in K, i in I} c[k] * i * x[k,i] + sum{k in K, i in I} x[k,i] * t[i];

s.t. c1{k in K}
  sum{i in I} x[k,i] = 1;

solve;

printf {k in K} "my[%d] = %d\n", k, sum{i in I} i * x[k,i];

end;


GLPK for Java comes with a file examples/Mip.java showing how to create a MIP problem in Java.

For details of the methods and constants used consult doc/glpk.pdf of the GLPK source distribution.

Best regards

Xypron

Zong, Yi wrote:

Hi!

      I have an objective function described as following:

The optimized variables are , which are integer between [0, 10], is a lineal function of an

, and

Can I use GLPK for JAVA to get the optimized results? If it is possible, could you give me an example?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]