help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] GLPKConstants - legend


From: Xypron
Subject: Re: [Help-glpk] GLPKConstants - legend
Date: Wed, 01 Sep 2010 20:52:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Jana,

GLPK for Java downloadable from http://glpk-java.sourceforge.net
is compiled from GLPK using package Swig for code generation.

Some examples are given in directory examples/java of GLPK for Java. You will find a short description in doc/glpk-java.pdf.

All constants of Java class org.gnu.glpk.GLPKConstants are derived form values in include/glpk.h of the source distribution of GLPK available at ftp://ftp.gnu.org/gnu/glpk

All C functions of GLPK (which are mapped to methods of class org.gnu.glpk.GLPK in Java) are explained in the GLPK manual (doc/glpk.pdf), e.g.

2.9.1 glp set col kind—set (change) column kind
Synopsis
void glp_set_col_kind(glp_prob *mip, int j, int kind);
Description
The routine glp_set_col_kind sets (changes) the kind of j-th column
(structural variable) as specified by the parameter kind:
GLP_CV continuous variable;
GLP_IV integer variable;
GLP_BV binary variable.
...

2.2.9 glp set row bnds—set (change) row bounds
Synopsis
void glp_set_row_bnds(glp_prob *lp, int i, int type,
double lb, double ub);
Description
The routine glp_set_row_bnds sets (changes) the type and bounds of i-th
row (auxiliary variable) of the specified problem object.
The parameters type, lb, and ub specify the type, lower bound, and
upper bound, respectively, as follows:
Type Bounds Comment
GLP_FR −1 < x < +1 Free (unbounded) variable
GLP_LO lb · x < +1 Variable with lower bound
GLP_UP −1 < x · ub Variable with upper bound
GLP_DB lb · x · ub Double-bounded variable
GLP_FX lb = x = ub Fixed variable
...


Best regards

Xypron

JanaT wrote:
Hello!

I´m trying to get along with GLPK and Java and have some problems understanding
how to use it.

Defining constraints the GLPKConstants are used. Is there somewhere a list to
explain them? Or is there a tutorial? Googling the question does´t help. The (2
or 3) examples I found do not explain my questions...

What means GLPKConstants.GLP_CV?
GLPK.glp_set_col_kind(lp, 1, GLPKConstants.GLP_CV);

What means GLPKConstants.GLP_DB?
GLPK.glp_set_row_bnds(lp, 1, GLPKConstants.GLP_DB, 0, 0.2);



Thank You,
Jana


_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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