help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Error in Visual C for MIP]


From: Xypron
Subject: Re: [Help-glpk] [Fwd: Error in Visual C for MIP]
Date: Wed, 22 Jun 2011 23:52:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110620 Thunderbird/5.0b2

Hello Sheetal,

in the source code of GLPK available at
ftp://ftp.gnu.org/gnu/glpk/glpk-4.45.tar.gz
you will find file
glpk-4.45/examples/sample.c
which shows how to create columns with
glp_add_cols()
before defining objective coefficients.

If this does not help, please, provide a
complete source file which reproduces your
problem.

Best regards

Xyp


Andrew Makhorin schrieb:
-------- Forwarded Message --------
From: sheetal murkute<address@hidden>
To:address@hidden
Subject: Error in Visual C for MIP
Date: Wed, 22 Jun 2011 01:38:07 -0400

Hi,
I am writing MIP code in visual c 2010. I use following code for
building objective function for MIP.
But, while debugging this, I get the error as '
glp_set_obj_coef: j=1; column number out of range
Error detected in file ..\src\glpapi01.c at line 680.




My code for building objective function for MIP:

/* create objective function for MIP */

printf("Enter objective function coefficients /n");
for(i=1 ; i<=6; i++)
scanf("%f",&ObjCoeff[i]);

glp_set_obj_dir(mip, GLP_MIN);
for(i=1 ; i<=6; i++)
{
glp_set_obj_coef(mip,i,ObjCoeff[i]);
}

Please help me regarding this.

Thanks with Best Regards,
Sheetal





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






reply via email to

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