[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] [Fwd: Multi-period problem]
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] [Fwd: Multi-period problem] |
Date: |
Thu, 26 Jan 2012 19:17:22 +0100 |
Hello Clara,
your problem contains integer variables.
glpkcc.cpp has these lines
switch (method) {
case 'I':
errnum = glp_intopt( lp, &iParam );
errnum += 200; //this is to avoid ambiguity in the return codes.
break;
Hence, please, subtract 200 from the error code you receive.
Possible error codes for glp_intopt are listed in glpk-4.47/doc/glpk.pdf and
defined in glpk-4.47/src/glpk.h:
GLP_EBOUND
GLP_EROOT
GLP_ENOPFS = 0x0A no primal feasable solution -> 210
GLP_ENODFS = 0x0B no dual feasable solution -> 211
GLP_EFAIL
GLP_EMIPGAP
GLP_ETMLIM
GLP_ESTOP
The numeric values might be different for other versions of GLPK then 4.47.
The source of GLPK is available at
ftp://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz
Looking at your Matlab code I guess you would have an easier live writing your
problem in the GNU Math Programming Language and the standalone solver glpsol
included in the GLPK distribution.
Best regards
Xypron
-------- Original-Nachricht --------
> Datum: Thu, 26 Jan 2012 08:24:54 +0100
> Betreff: AW: [Help-glpk] [Fwd: Multi-period problem]
> Hi Xypron,
>
> the version I've been using is from the http://glpkmex.sourceforge.net/
> homepage, which offers a Matlab interface for the GLPK library.
> In the appendix again my Matlab code, I hope you'll receive it this time.
>
> I would be very thankful for any kind of advice how to solve problems of
> this kind with GLKPMEX.
>
> Best regards,
> Clara
>
>
>
> -----Ursprüngliche Nachricht-----
> Betreff: Re: [Help-glpk] [Fwd: Multi-period problem]
>
> Dear Clara,
>
> your message had to be forwarded manually because you are not subscribed
> to the GLPK help list, see
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
> Please, specify which version of GLPK and which interface to Matlab you
> are using. Your Matlab code was not in the forwarded appendix.
>
> You should be able to identify the meaning of the return codes by looking
> at src/glpk.h and doc/glpk.pdf of the source version of GLPK that
> corresponds to the binary you are using. The recent GLPK sources are
> available at
> ftp://ftp.gnu.org/gnu/glpk
>
> Best regards
>
> Xypron
>
> > -------- Forwarded Message --------
> > Date: Tue, 24 Jan 2012 18:04:48 +0100
> >
> > Dear GLPK-Support-Team,
> >
> > I’ve been trying for ages to set up a multi-period problem with
> MATLAB.
> >
> > First I have already solved a single period problem with MATLAB and glpk
> > solver without any problems.
> >
> > Second we tried to set up a multi-period problem which is a planning
> > problem. Please find attached a short description and a copy of our
> > MATLAB code.
> >
> > It would be very kind of you if you could pass us an advice or a similar
> > example for this kind of problems.
> >
> > When we tried to call glpk solver we received different error messages,
> > like 211 and 210.
> >
> > Thanks in advance,
> >
> > Clara Heuberger
>
--
Follow me at http://twitter.com/#!/xypron
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de