[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Multivariate problem
From: |
Xypron |
Subject: |
Re: [Help-glpk] Multivariate problem |
Date: |
Sat, 03 Oct 2009 19:22:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090823 SeaMonkey/1.1.18 |
Hello Juliana,
For a reference see the API documentation in doc/glpk.pdf in the
distribution tarball available at
ftp://ftp.gnu.org/gnu/glpk/glpk-4.39.tar.gz
Have a look at the examples the examples folder and in glpk-java
available at http://glpk-java.sourceforge.net/
Consider using modeling language GNU Mathprog available in GLPK.
sum[i=m to N] x_i((a_i) + (b_i*y_i)) + sum[i=1 to N] b_i*y_i
is not a linear term because it contains the product of two variables
x_i * y_i.
If you want to use a MILP solver like GLPK you will have to reformulate
your problem, e.g.
maximize obj :
sum{i in m..N} w[i] + sum{i in 1..N} b[i]*y[i];
s.t. c1{i in m..N} :
w[i] <= a[i] + b[i] * y[i];
s.t. c2{i in m..N} :
w[i] <= x[i] * M;
Best regards
Xypron
Juliana Freitag wrote:
Hi everybody,
is it possible to model the function below using GLPK API?
sum[i=m to N] x_i((a_i) + (b_i*y_i)) + sum[i=1 to N] b_i*y_i
a and b are constants
x is a binary variable
y is a integer variable
Thank you,
Juliana.
Roy.tar.gz
Description: GNU Zip compressed data