Thanks, I already solved the issue I had, well none of you understood what I
was asking, later I'll what I did.
thanks again
On Fri, Aug 1, 2008 at 1:00 AM, glpk xypron <[EMAIL PROTECTED]> wrote:
> Hello Jose,
>
> to find out if the problem is with the model and data files, please, run
> glpsol -m your_problem.mod -d your_data.dat --check --wtxt output.out
> and have a look at created file output.out.
> (Glpsol is the stand alone solver provided with GLPK.)
>
> A minimum working example file showing
> - reading a problem
> - writing with lpx_print_prob
> - solving the problem
> is
>
> #include "glpapi.h"
> int main()
> {
> LPX *lp = NULL;
> lp = lpx_read_model("examples/sudoku.mod", "examples/sudoku.dat", NULL);
> lpx_print_prob(lp, "sudoku.out");
> lpx_std_basis(lp);
> lpx_simplex(lp);
> lpx_delete_prob(lp);
> }
>
> The example sudoku problem is provided in the source distribution
> ftp://ftp.gnu.org/gnu/glpk/glpk-4.29.tar.gz
>
> If You need further assistance, please, send a link to the relevant files
> or add them as attachment.
>
> Best regards
>
> Xypron
>
>
> -------- Original Message --------
> > Hey everyone, I've been playing with GLPK this few days.
> > Im trying to pass data to glpk but not from a file, I've been using de
> > Reference Manual 4.10 to guide me.
> > The problem is that I need to model a transport problem, what I did was
> to
> > create 3 arrays like the manual says.
> >
> > What I did was to make a program that would read the model and data from
> > files, and after resolving the problem, I used lpx_print_prob() so I
> would
> > compare the problem with the one passed by parameters and not reading any
> > file.
> >
> > I succed in part of it. The parameter I goes from 1 to 4, J goes from 1
> to
> > 32, d is a matrix of 4 x 32 ints.
> > When the program its executed and lpx_print_prob executed, I only get
> part
> > of the file like the one it was supposed to be.
> > Instead of arrays of 128 ints, it seems i need them of 384 ints, but I do
> > not know with what data fill the rest.
> >
> > I made an experiment adding a coordinate that wasnt in the matrix a[1,33]
> > and give him the value of 1.0
> > and I got that another parameter was printed in the file, so that gives
> me
> > the idea that I need to keep filling the array with data
> > but I dont know where to get more data.
> >
> > I do not if you guys understan my problem?
> >
> > Thank you,
> >
> > --
> > José I. Monreal Bailey
>
> --
> GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> Jetzt dabei sein:
> http://www.shortview.de/[EMAIL PROTECTED]
>
--
José I. Monreal Bailey
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk