[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: [Coin-discuss] GLPK AND SYMPHONY not getting the same so
From: |
ZT |
Subject: |
[Help-glpk] Re: [Coin-discuss] GLPK AND SYMPHONY not getting the same solutions |
Date: |
Thu, 20 Oct 2005 02:24:49 -0700 (PDT) |
Thank you both for clarifing things. But that 1020
warning doesnt comply with GLPK and SYMPHONY. Both
programs take the upper bound set to infinity if
unspecified. The same goes for CPLEX.
Ted, i have another question about getting the values
after solving the problem. Here is my code:
sym_environment *env = sym_open_environment();
sym_parse_command_line(env, argc, argv);
sym_load_problem(env);
sym_set_obj_sense(env, -1);
sym_find_initial_bounds(env);
sym_solve(env);
This goes without problems. But if i include any of
these functions(after declaring "double *ObjVal" and
"double *Var"):
sym_get_obj_val(env, ObjVal);
sym_get_col_solution(env, Var);
the error window appears and closes the program. What
seems to be the problem? Im running on VC++6.
--- Ted Ralphs <address@hidden> wrote:
> Hi Andrew,
>
> Under the heading "BOUNDS Section" and the
> subheading "Default Bounds,"
> the OSL manual says the following:
>
> "For integer variables, the default bounds on
> columns are 0 and 1.
> (WARNING, if you want a very large bound for an
> integer variable,
> explicitly set it to 1020. DO NOT specify a value
> larger than 1020, or
> leave the value unspecified, thinking that the
> result will be "unbounded.")"
>
> Hope this clarifies things. Perhaps John Forrest
> could comment.
>
> Cheers,
>
> Ted
>
> Andrew Makhorin wrote:
> >>Yes, this is exactly the problem. According to the
> MPS standard, any
> >>integer variable without bounds is assumed to be
> binary. The COIN MPS
> >>reader complies with this standard, but not all
> readers do (GLPKs reader
> >>does not, for instance).
> >
> >
> > OSL documentation says (chapter "Passing Your
> Model Using Mathematical
> > Programming System (MPS) Format", section "Integer
> Data"):
> >
> > General Integer Variables
> >
> > For general integer variables, the
> following indicates the
> > various values you may use for the fields:
> >
> > If you are defining general integer
> variables, field 1 must
> > be blank and field 5 must contain the
> value 'INTORG'
> > (including the quotation marks) in the
> record that denotes
> > the start of integer variables. In the
> record that denotes
> > the end of integer variables, field 1 must
> be blank and
> > field 5 must contain the value 'INTEND'.
> >
> > You can select any name for field 2 as
> long as it is
> > different from the preceding and following
> column names.
> >
> > Field 4, although ignored, must be blank
> in free format.
> >
> > All variables between the INTORG and
> INTEND markers are
> > taken as integer variables if the intunit
> parameter in
> > the call to EKKMPS is nonzero.
> >
> > And this is clarified by the following example:
> >
> > The following is an example of defining
> general integer
> > variables:
> >
> >
>
*234567890123456789012345678901234567890123456789012345678901234567890
> > COLUMNS
> > COL01 OBJ 1.0
> > COL01 ROW01 3.0 ROW05
> 5.6
> > COL02 ROW01 1.0 ROW02
> 2.0
> > *
> > * Mark COL03 and COL04 as integer
> > *
> > INT1 'MARKER' 'INTORG'
> > COL03 ROW02 1.1 ROW03
> 1.0
> > COL04 ROW01 -2.0 ROW04
> 2.8
> > INT1END 'MARKER' 'INTEND'
> > *
> > COL05 OBJ 2.0
> > COL05 ROW01 -1.0 ROW05
> 1.0
> > COL06 ROW03 1.0
> > COL07 ROW04 -1.2
> > COL08 OBJ -1.0
> > COL08 ROW01 -1.0 ROW05
> 1.9
> >
> > Here, the columns named COL03 and COL04
> must take on integer
> > values.
> >
> > I didn't find any points that "any integer
> variable without bounds is
> > assumed to be binary".
> >
> > Andrew Makhorin,
> > maintainer of glpk
> >
> > (Sorry, if my message sent twice due to incorrect
> clock settings.)
>
>
> --
> Dr. Ted Ralphs
> Assistant Professor
> Industrial and Systems Engineering
> Lehigh University
> (610)758-4784
> address@hidden
> www.lehigh.edu/~tkr2
>
>
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/