help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: Hello,Nigel, I have some questions about GLPK


From: Nigel Galloway
Subject: [Help-glpk] Re: Hello,Nigel, I have some questions about GLPK
Date: Fri, 17 Oct 2008 12:09:03 +0100

I think the example uses only .NET 1.0 features so should work with Visual Studio 2003. Generics were clearly sponsored by the manufacturers of Asprin and Paracetamol, but Iterators are useful so you should catch up a bit anyway.

The example was developed under Linux. The .so file is the Linux equivalent of a .dll under Windows.

Are you able to compile glpk as a dll? If so why not compile the latest version? Otherwise do you have 4.9 as a dll? I have attached 4.32 compiled as a dll if that helps.

Also attached is t1.cs with:

const string glpkLibrary = "glpk_4_32.dll";

modified appropriatly. It is then compiled:

Microsoft Windows [Version 6.0.6000]

Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Nigel>cd OM20081018

C:\Users\Nigel\OM20081018>csc /unsafe t1.cs

Microsoft (R) Visual C# 2008 Compiler Beta 2 version 3.05.20706.1

for Microsoft (R) .NET Framework version 3.5

Copyright (C) Microsoft Corporation. All rights reserved.

Then executed:

C:\Users\Nigel\OM20081018>t1 2424 772

a = 2424, b = 772

Hello Nigel

Trying 772

0: obj = 0.000000000e+000 infeas = 1.000e+000 (0)

* 1: obj = 0.000000000e+000 infeas = 0.000e+000 (0)

OPTIMAL SOLUTION FOUND

Integer optimization begins...

+ 1: mip = not found yet >= -inf (1; 0)

+ 3: >>>>> 0.000000000e+000 >= 0.000000000e+000 0.0% (3; 0)

+ 3: mip = 0.000000000e+000 >= tree is empty 0.0% (0; 5)

INTEGER OPTIMAL SOLUTION FOUND

x = 1, y = -3, a*x + b*y = 108

Trying 108

* 3: obj = 0.000000000e+000 infeas = 0.000e+000 (0)

OPTIMAL SOLUTION FOUND

Integer optimization begins...

+ 3: mip = not found yet >= -inf (1; 0)

+ 7: >>>>> 0.000000000e+000 >= 0.000000000e+000 0.0% (4; 1)

+ 7: mip = 0.000000000e+000 >= tree is empty 0.0% (0; 9)

INTEGER OPTIMAL SOLUTION FOUND

x = -7, y = 22, a*x + b*y = 16

Trying 16

* 7: obj = 0.000000000e+000 infeas = 0.000e+000 (0)

OPTIMAL SOLUTION FOUND

Integer optimization begins...

+ 7: mip = not found yet >= -inf (1; 0)

+ 21: >>>>> 0.000000000e+000 >= 0.000000000e+000 0.0% (5; 10)

+ 21: mip = 0.000000000e+000 >= tree is empty 0.0% (0; 29)

INTEGER OPTIMAL SOLUTION FOUND

x = -50, y = 157, a*x + b*y = 4

Trying 4

Solution is 4

Goodbye Nigel

C:\Users\Nigel\OM20081018>

I hope this helps, it should only be necessary to unzip the attached and run it.

----- Original Message -----
From: "bo liu"
To: address@hidden
Subject: Hello,Nigel, I have some questions about GLPK
Date: Tue, 14 Oct 2008 11:40:30 +0800


Dear Sir,
   I'm a student of China, I have some question about using GLPK in dotnet with C# .From this page (http://www.mail-archive.com/address@hidden/msg01545.html) I know that you did it. Do you use visual studio 2005 ?In visual studio 2003, there is something wrong with your program t1.cs .
   But,where is the libglpk.so ? How can i get it? And where should I put it  ?
 I want to use GLPK  to solving linear programming .
 I have installed GLPK 4.9 in my computer, and my software is visual studio 2003.
In your program ,GLPK is used in WinForm ,right ? But I want to use it in WebForm , i don't know how to do that. I study computer all by myself ,so there is lots of things I don't know.
Hope you can give me an answer. My English is poor, and sorry to trouble you .
 
 
                                                   best wishes
--
bo liu

--

_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com


Powered by Outblaze
reply via email to

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