Re: [Help-glpk] [Fwd: Help for GLPK Java program]

2018-04-12 Thread Heinrich Schuchardt

Dear Titouan,

the library functions are described in detail in file doc/glpk.pdf of 
the GLPK source distribution. Have a look at the chapter "Problem 
retrieving routines". See for instance glp_get_mat_row() and 
glp_get_mat_col().


Best regards

Heinrich

On 04/12/2018 12:12 PM, Andrew Makhorin wrote:

 Forwarded Message 
From: SORANGE DELIEGE Titouan
To: help-glpk@gnu.org 
Subject: Help for GLPF java program
Date: Thu, 12 Apr 2018 10:32:40 +0200

Good morning,

  


I am currently working on a linear programming project using GLPK and
Java.

  


I have built the matrix that I need to give to GLPK (with the three
arguments ia, ja and ar with the glp_load_matrix method) and I have set
all the coefficients for each constraint of my problem.

  


I would like to print all the coefficients from the ar array to have an
overview of the matrix from GLPK (before the solving) but I don’t know
which function I should use for that. I tried to use
GLPK.glp_get_row_prim for each line and each column of that same line
(with a loop) but the values are all set at 0 and it seems fair as this
function is used for LP relaxation…

Thank you for your help.

  


Regards,

  


Titouan





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



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


Re: [Help-glpk] [Fwd: help with GLPK solver installation]

2016-11-25 Thread Heinrich Schuchardt
Your screenshot shows lines coming from GLPK, e.g.

Model has been successfully generated.
glp_simplex: ...
Crashing ...
Size of triangular part = ...

So the GLPK libary has been loaded correctly. Nothing is wrong with the
PATH.

If you find output saying the problem does not have a feasable solution
this is not a bug of GLPK but a feature of the mathematical problem you
try to solve.

In this case at least GLPK 4.60 writes

PROBLEM HAS NO PRIMAL FEASIBLE SOLUTION
or
PROBLEM HAS NO DUAL FEASIBLE SOLUTION

Best regards

Heinrich Schuchardt




On 11/25/2016 08:29 PM, Alexander Tankou wrote:
> Dear Heinrich,
> 
> from the manual, I can see that the RunSimulation.exe is used with w32.
>  But is there a way I can double check that?
> 
> For the path variable this is the input value:
> 
> *;C:\Program Files (x86)\GnuWin32\bin; * (note the semi-colon at the
> beginning and at the end)
>  
> Should I then have it this way:
> 
> *;"C:\Program Files (x86)\GnuWin32\bin“; *
> 
> 
> From the manual it is written that  "/Glpk 4.34 /should be downloaded 
> to use the RunSimulation.exe file. While my model get successfully
> generated, no feasible solution are found like it can be seen from the
> picture attached. I really believe the issue I am having has to do with
> how I set the path variable.
> 
> Many thanks for the help, I really appreciate it!
> 
> Alex
> 
> 
> 
> 
>> On Nov 25, 2016, at 1:09 PM, Heinrich Schuchardt > > wrote:
>>
>>
>> Hello Alex,
>>
>> GLPK for Windows comes with two directories:
>> w32 contains the 32bit library.
>> w64 contains the 64bit library.
>>
>> The bitness of the library in the path must match the bitness of the
>> executable RunSimulation.exe you try to run.
>>
>> When specifying paths with spaces use quotation marks.
>>
>> Furthermore the library API has changed significantly over time.
>> Which version of GLPK was RunSimulation.exe built for?
>>
>> Is there a log telling what error occured?
>> The screenshot does not provide enough diagnostic information.
>>
>> GLPK can be built from source on OS X.
>>
>> Best regards
>>
>> Heinrich Schuchardt
>>
>> On 11/20/2016 05:06 PM, Andrew Makhorin wrote:
>>>  Forwarded Message 
>>> From:
>>> To: help-glpk@gnu.org 
>>> Subject: help with GLPK solver installation
>>> Date: Sun, 20 Nov 2016 08:56:37 -0500
>>>
>>> Dear friends,
>>>
>>>
>>> I have  installed GLPK for the first time on my window PC (I use window
>>> 7) but for some reasons my command prompt cannot locate the file and I
>>> keep getting an error message (see picture attached)
>>>
>>>
>>> Here is the step by step process that  I have followed:
>>>
>>>
>>> 1) downloaded GLPK from this
>>> link: https://sourceforge.net/projects/winglpk/
>>>
>>>
>>> 2) installed GLPK in my C drive
>>>
>>>
>>> 3) set the path variable so that command prompt knows where GLPK is
>>> located (made sure I used the semi colon at the beginning and at the end
>>> of the path)
>>>
>>>
>>> Yet every time I try to run my simulation, I get an error message.
>>>
>>>
>>> How should I  proceed to have it working on my pc windows ? By the way
>>> can GLPK be used on macbook?
>>>
>>>
>>> Thank you so much for the help.
>>>
>>>
>>> Alex
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> Help-glpk mailing list
>>> Help-glpk@gnu.org 
>>> https://lists.gnu.org/mailman/listinfo/help-glpk
>>>
>>
> 


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


Re: [Help-glpk] [Fwd: help with GLPK solver installation]

2016-11-25 Thread Heinrich Schuchardt

Hello Alex,

GLPK for Windows comes with two directories:
w32 contains the 32bit library.
w64 contains the 64bit library.

The bitness of the library in the path must match the bitness of the
executable RunSimulation.exe you try to run.

When specifying paths with spaces use quotation marks.

Furthermore the library API has changed significantly over time.
Which version of GLPK was RunSimulation.exe built for?

Is there a log telling what error occured?
The screenshot does not provide enough diagnostic information.

GLPK can be built from source on OS X.

Best regards

Heinrich Schuchardt

On 11/20/2016 05:06 PM, Andrew Makhorin wrote:
>  Forwarded Message 
> From:
> To: help-glpk@gnu.org
> Subject: help with GLPK solver installation
> Date: Sun, 20 Nov 2016 08:56:37 -0500
> 
> Dear friends,
> 
> 
> I have  installed GLPK for the first time on my window PC (I use window
> 7) but for some reasons my command prompt cannot locate the file and I
> keep getting an error message (see picture attached)
> 
> 
> Here is the step by step process that  I have followed:
> 
> 
> 1) downloaded GLPK from this
> link: https://sourceforge.net/projects/winglpk/
> 
> 
> 2) installed GLPK in my C drive 
> 
> 
> 3) set the path variable so that command prompt knows where GLPK is
> located (made sure I used the semi colon at the beginning and at the end
> of the path)
> 
> 
> Yet every time I try to run my simulation, I get an error message.
> 
> 
> How should I  proceed to have it working on my pc windows ? By the way
> can GLPK be used on macbook? 
> 
> 
> Thank you so much for the help.
> 
> 
> Alex
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
> 


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


Re: [Help-glpk] [Fwd: help with GLPK solver installation]

2016-11-25 Thread Michael Hennebry

On Sun, 20 Nov 2016, João Flávio de Freitas Almeida wrote:


As a Windows user, I suggest you use GUSEK, an excellent interface of GLPK
with pre-compiled GLPK binaries.


That might be sufficient for Alexander's current needs,
but from the GUSEK web site, I get the impression
that the C interface is not available.

Also, though possibly helpful,
it does not answer his question: WTF am I doing wrong?.

I've not compiled software for Windows 7, so cannot answer it either.


https://sourceforge.net/projects/gusek/?source=typ_redirect

http://gusek.sourceforge.net/gusek.html

GLPK can be used on Linux too, but not on Mac.


Why not a Mac?
Do Macs not allow user-installed software?

--
Michael   henne...@web.cs.ndsu.nodak.edu
Today is Thanksgiving for turkeys.___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: help with GLPK solver installation]

2016-11-20 Thread João Flávio de Freitas Almeida
Hi Alexander,

As a Windows user, I suggest you use GUSEK, an excellent interface of GLPK
with pre-compiled GLPK binaries.

https://sourceforge.net/projects/gusek/?source=typ_redirect

http://gusek.sourceforge.net/gusek.html

GLPK can be used on Linux too, but not on Mac.

Bests,
--
João Flávio de Freitas Almeida

2016-11-20 14:06 GMT-02:00 Andrew Makhorin :

>  Forwarded Message 
> From: Alexander Tankou 
> To:
> ​​
> help-glpk@gnu.org
> Subject: help with GLPK solver installation
> Date: Sun, 20 Nov 2016 08:56:37 -0500
>
> Dear friends,
>
>
> I have  installed GLPK for the first time on my window PC (I use window
> 7) but for some reasons my command prompt cannot locate the file and I
> keep getting an error message (see picture attached)
>
>
> Here is the step by step process that  I have followed:
>
>
> 1) downloaded GLPK from this
> link: https://sourceforge.net/projects/winglpk/
>
>
> 2) installed GLPK in my C drive
>
>
> 3) set the path variable so that command prompt knows where GLPK is
> located (made sure I used the semi colon at the beginning and at the end
> of the path)
>
>
> Yet every time I try to run my simulation, I get an error message.
>
>
> How should I  proceed to have it working on my pc windows ? By the way
> can GLPK be used on macbook?
>
>
> Thank you so much for the help.
>
>
> Alex
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: Help GLPK]

2016-09-22 Thread Heinrich Schuchardt
Dear Christoph,

your mail had to be forwarded manually, because you are not subscribed
to the GLPK help list, cf.
https://lists.gnu.org/mailman/listinfo/help-glpk

The GLPK for C#/CLI project supplies wrapper classes for GLPK that can
be used in .NET/Mono projects, see http://glpk-cli.sourceforge.net/.

If you have downloaded GLPK for Windows from http://winglpk.sourceforge.net/
you will see that GLPK for C#/CLI is already included.

You will find the C# examples in
examples/csharp and the documentation is in doc/glpk-cli.pdf,
doc/gmpl.pdf, and doc/cli/index.html.

The script files used to build and run the examples are
w64/check_cli.bat and w32/check_cli.bat depending of the bitness of the
target application.

If you want to build an application in Visual Studio you will have to
ensure that the following dlls are in the correct search paths or your
project:

glpk_4_60.dll - the GLPK native library
libglpk_cli_native.dll - the GLPK for C#/CLI native library
libglpk_cli.dll - the GLPK for C#/CLI assembly

You will have to add libglpk_cli.dll to the reference path:
https://msdn.microsoft.com/en-us/library/6taasyc6%28v=vs.100%29.aspx

You may also want to have a look at the wikibook for GLPK at
https://en.wikibooks.org/wiki/GLPK/

Best regards

Heinrich Schuchardt


On 09/22/2016 08:00 PM, Andrew Makhorin wrote:
>  Forwarded Message 
> To: help-glpk@gnu.org
> Subject: Help GLPK
> Date: Thu, 22 Sep 2016 10:40:27 -0300
> 
> Hello, I would like to ask a help to set up a project in C # in Visual
> Studio using the dll GLPK, I am unfortunately having the following error
> {"The initializer type is 'org.gnu.glpk.GLPKPINVOKE' threw an
> exception."} when I will call some method of GLPK
> What would be the correct preocedimento to build the GLPK for Visual
> Studio using C # 
> 
> 
> 
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
> 


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


Re: [Help-glpk] [Fwd: Help]

2016-01-14 Thread Michael Hennebry

On Thu, 14 Jan 2016, L. Felipe Castañeda G.  wrote:

CHd {(i,t) in GH: t-1 != 0}:V[i,t] = V[i,t-1] + g[i,t]*r[i,t] - 
S[i,t] - g[i,t]*k[i,t];


But I need to set an initial value for V[i,t]. I mean, I want to set 
V[i,1] = 60.


How can I do that?


You mean
fred { (i,t) in GH: t=1 } : V[i,1] = 60
?

--
Michael   henne...@web.cs.ndsu.nodak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
 --  someeecards___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: Help in installing GPLK]

2013-11-13 Thread Jean-Marc Sac-Epee

Le 13/11/2013 15:15, Andrew Makhorin a écrit :

 Forwarded Message 
From: Lokendra Devangan 
To: help-glpk@gnu.org
Subject: Help in installing GPLK
Date: Wed, 13 Nov 2013 19:10:50 +0530

Dear,


I am new to open source software and now trying use GPLK to solve linear
optimization problem. I have
downloaded glpk-4.52.tar.gz and glpk-4.52.tar.gz.sig. But I do not know
how to use it. Could please tell where I can find step by step process
to use it. Sorry for being a novice.



What is your OS ? Linux ? Which distro ?

Best,

JM

--
Jean-Marc Sac-Épée, Ingénieur de Recherche en Calcul Scientifique,
Institut Élie Cartan de Lorraine, UMR 7502,
Université de Lorraine, Site de Metz,
Tél 03 87 54 72 69  Fax 03 87 31 52 73,
http://www.math.univ-metz.fr/~jmse
mail: jean-marc.sac-e...@univ-lorraine.fr


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


Re: [Help-glpk] [Fwd: help running glpk 4.52]

2013-07-24 Thread Giorgio Sartor
Or

g++ example.cpp -L -lglpk -o example

G.S.

Il giorno 24/lug/2013, alle ore 23:10, Raniere Silva  
ha scritto:

> Hello Juan,
> 
>> I am compiling using:  g++ example.cpp -lglpk -o example
>> 
>> However, when I run the file ./example  I get:
>> 
>> error while loading shared libraries: libglpk.so.35: cannot open shared 
>> object file: No such file or directory
> 
> Your operational system can't locate the shared library. You can try
> 
>$ LD_LIBRARY_PATH=/path/to/libglpk.so/:$LD_LIBRARY_PATH ./example
> 
> There are other ways to solve your problem. Search for"Shared Library".
> 
> Raniere
> 
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk

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


Re: [Help-glpk] [Fwd: help running glpk 4.52]

2013-07-24 Thread Raniere Silva
Hello Juan,

> I am compiling using:  g++ example.cpp -lglpk -o example
> 
> However, when I run the file ./example  I get:
> 
> error while loading shared libraries: libglpk.so.35: cannot open shared 
> object file: No such file or directory

Your operational system can't locate the shared library. You can try

$ LD_LIBRARY_PATH=/path/to/libglpk.so/:$LD_LIBRARY_PATH ./example

There are other ways to solve your problem. Search for"Shared Library".

Raniere

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


Re: [Help-glpk] [Fwd: Help demand]

2013-02-11 Thread Jeffrey Kantor
Hi Alexandre,

The model appended below captures the logic of your problem.  This is a
direct translation of your problem logic into MathProg using standard
techniques (for example, see
http://moya.bus.miami.edu/~tallys/docs/logical-expr.pdf or
http://archive.ite.journal.informs.org/Vol3No3/ChlondToase/index.php).
 This model assumes X, Z, W, and K are integer variables.

You can verify by cutting and pasting into
http://www3.nd.edu/~jeff/mathprog/mathprog.html

Caveat emptor.

Jeff


var X, integer, >= 1, <= 60;
var Z, integer, >= 1, <= 60;
var W, integer, >= 1, <= 10;
var K, integer, >= 1, <= 10;

var y, binary;

param M := 100;
param eps := 0.01;

# A <=> (X>Z)
var A, binary;
s.t. A1: X - Z >= eps - M*(1-A);
s.t. A2: X - Z <= M*A;

# B <=> (Z>X)
var B, binary;
s.t. B1: Z - X >= eps - M*(1-B);
s.t. B2: Z - X <= M*B;

# C <=> (W>K)
var C, binary;
s.t. C1: W - K >= eps - M*(1-C);
s.t. C2: W - K <= M*C;

# D <=> (K>W)
var D, binary;
s.t. D1: K - W >= eps - M*(1-D);
s.t. D2: K - W <= M*D;

# y => not(A) and not(B) and not(C) and (not(D))
s.t. a: A + y <= 1;
s.t. b: B + y <= 1;
s.t. c: C + y <= 1;
s.t. d: D + y <= 1;

# not(y) => A or B or C or D
s.t. e: A + B + C + D + y >= 1;

maximize obj: X + Z + W + K;
solve;
end;



On Mon, Feb 11, 2013 at 7:53 AM, Andrew Makhorin  wrote:

>  Forwarded Message 
> From: Alexandre Saidi 
> To: glpk 
> Cc: Alexandre Saidi , Andrew Makhorin
> 
> Subject: Help demand
> Date: Mon, 11 Feb 2013 10:14:48 +0100
>
> Dears,
> I've been fighting some (few) quarters with the translation of the
> following constraint into GLPK.
> If anybody can help with a working answer :
>
> trying to translate efficiently the "element" CP constraint to GLPK, I've
> the following (simpler) constraints that i want to translate (but let's
> forget "element" for now) :
>
> (binary_y = 1) <=> (X = Z and W = K)every
> thing is  variable.
>
> X,Z are bounded (1..60), W,K are also bounded (1..10, they are vector
> indices)
>
> That's, if I ever have binary_y = 1, I want to put 2 pairs of variables
> equal. 'and' is a logical connector and '<=>' stands for 'equivalent'
> (double 'implies').
> In fact, I'm working with a problem with 2 variables and many many
> constraints. So the 'performance' is a critical issue.
>
> I know that the 'element' constraint has been studied but those general
> solutions did not work (efficiently) for me.
> A translation by the BigM method is welcome (apart from all cons of that
> method).
>
> regards
>
> Alex
>
>
>  ---
> Alexandre Saidi
> Maitre de Conférences
> Ecole Centrale de Lyon-Dép. MI
> LIRIS-CNRS UMR 5205
> Tél : 0472186530, Fax : 0472186443
>
>
>
>
>
>
>
>
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: help on min max problem]

2012-04-30 Thread Sarad Av
hi,

Hope this helps

http://www.ibm.com/developerworks/forums/thread.jspa?threadID=332800

min max {x,y}


then you can model it with an auxiliary variable z as follows:

min z
   s.t. x - z <= 0
y - z <= 0

Regards,
Sarad.



On Tue, May 1, 2012 at 1:31 PM, Andrew Makhorin  wrote:

>  Forwarded Message 
> From: Humayun Arafat 
> Reply-To: Humayun Arafat 
> To: help-glpk@gnu.org 
> Subject: help on min max problem
> Date: Mon, 30 Apr 2012 08:22:36 -0700 (PDT)
>
> Hi,
>
>
> I need to perform a min max using linear programming tool.
> I have to perform this using C api in glpk
>
>
> This is my equation.
> min(max(   f1(x),f2(x)   ))
>
> Can you please help me on how I can put it in glpk using C API?
>
>
> thanks
> Sagor
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>



-- 
Patience, Persistence & Truth
-Sarad A.V
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-11 Thread glpk xypron
Hello Robbie,

said "Classpath Exception" reads:

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,
and to copy and distribute the resulting executable under terms of your
choice, provided that you also meet, for each linked independent module,
the terms and conditions of the license of that module.  An independent
module is a module which is not derived from or based on this library.  If
you modify this library, you may extend this exception to your version of
the library, but you are not obligated to do so.  If you do not wish to do
so, delete this exception statement from your version.

This could be applied to an application linking GLPK and a third party library, 
which is not GPL v3 compatible.

There are a lot of free software libraries published with a license which is 
not GPL v3 compatible. See
http://www.gnu.org/licenses/license-list.html#GPLIncompatibleLicenses

But as Andrew is the copyright holder of GLPK, it is up to him to choose a 
license.

Best regards

Xypron

 Original-Nachricht 
> Datum: Thu, 12 Apr 2012 04:27:58 +1200
> Betreff: Re: [Help-glpk] [Fwd: Help Needed]

> 
> Hello all
> 
> For those of us who don't use Java:
> 
>  "Classpath is a parameter -- set either on the
>   command-line, or through an environment variable --
>   that tells the Java Virtual Machine or the compiler
>   where to look for user-defined classes and packages."
> 
>   http://en.wikipedia.org/wiki/Classpath_%28Java%29
> 
> What would be the equivalent in C/C++, I wonder?
> An exception that allows for both static and dynamic
> linking??
> 
> My view is that if some kind of 'classpath' exception
> is made to GLPK, then it should be language-agnostic --
> that is, not specifically written for Java, Plankalkül,
> or any other supported or yet to be supported language
> binding.
> 
> cheers, Robbie

-- 
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

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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-11 Thread Robbie Morrison

Hello all

For those of us who don't use Java:

 "Classpath is a parameter -- set either on the
  command-line, or through an environment variable --
  that tells the Java Virtual Machine or the compiler
  where to look for user-defined classes and packages."

  http://en.wikipedia.org/wiki/Classpath_%28Java%29

What would be the equivalent in C/C++, I wonder?
An exception that allows for both static and dynamic
linking??

My view is that if some kind of 'classpath' exception
is made to GLPK, then it should be language-agnostic --
that is, not specifically written for Java, Plankalkül,
or any other supported or yet to be supported language
binding.

cheers, Robbie

--------
Subject:        Re: [Help-glpk] [Fwd: Help Needed]
From:   glpk xypron
Date:   Tue, 10 Apr 2012 22:09:53 +0200


> Hello Noli,
>
> GLPK Java is currently licensed under GPL v3.
>
> I could (and would be willing to) offer GLPK Java under
> a less restrictive license if the GLPK license were
> less restrictive.
>
> Actually the license of GLPK does not even allow it to
> be dynamically linked to any software that is not under
> a GPL v3 compatible license. It would be a great
> alleviation if Andrew could at least add a class path
> exception as in
>
> http://openjdk.java.net/legal/gplv2+ce.html
>
> Best regards
>
> Xypron

---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : morri...@iet.tu-berlin.de
Webmail (preferred)   : rob...@actrix.co.nz
[from Webmail client]



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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-10 Thread Noli Sicad
Hello Xypron,

Another FOSS project that I like and use is SpatiaLite (GIS extension
to SQLite).

http://www.gaia-gis.it/gaia-sins/

libspatialite and freexl are less restrictive -  MPL 1.1 and LGPL v2.1
or any subsequent version

SpatiaLite is licensed under the MPL tri-license terms; you are free
to choose the best-fit license between:

* the MPL 1.1
* the GPL v2.0 or any subsequent version
* the LGPL v2.1 or any subsequent version

https://www.gaia-gis.it/fossil/libspatialite/index

I hope Andrew will consider at least add a class path exception as you
mentioned.

Thanks.

Noli


On 4/11/12, glpk xypron  wrote:
> Hello Noli,
>
> GLPK Java is currently licensed under GPL v3.
>
> I could (and would be willing to) offer GLPK Java under a less restrictive
> license if the GLPK license were less restrictive.
>
> Actually the license of GLPK does not even allow it to be dynamically linked
> to any software that is not under a GPL v3 compatible license. It would be a
> great alleviation if Andrew could at least add a class path exception as in
>
> http://openjdk.java.net/legal/gplv2+ce.html
>
> Best regards
>
> Xypron

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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-10 Thread glpk xypron
Hello Noli,

GLPK Java is currently licensed under GPL v3.

I could (and would be willing to) offer GLPK Java under a less restrictive 
license if the GLPK license were less restrictive.

Actually the license of GLPK does not even allow it to be dynamically linked to 
any software that is not under a GPL v3 compatible license. It would be a great 
alleviation if Andrew could at least add a class path exception as in 

http://openjdk.java.net/legal/gplv2+ce.html

Best regards

Xypron

 Original-Nachricht 
> Datum: Tue, 10 Apr 2012 05:12:58 +1000
> Betreff: Re: [Help-glpk] [Fwd: Help Needed]

> Xypon, What is the license of GLPK Java utility JAR file?
> 
> The jar file is not linked to native solver, right? It is just
> interface to the solver.
> 
> Here my take on this issue.
> 
> 
> 
> GLPK native solver is GPL.
> 
> C programs + GPLK (GPL) solver = Your Application (GPL).
> 
> If  GLPK Java utility JAR file is:
> 
> 1. GLPK Java Jar (LGPL) + GPLK (GPL) solver + your code = Your app is
> OK to be released as LGPL /MIT / BSD / ( commercial).
> 
> 
> 2. GLPK Java Jar (GPL) + GPLK (GPL) solver + your code = GPL.
> 
> It is not OK to distribute your application without releasing all the
> source code (GPL).
> 
> Noli
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 4/10/12, Andrew Makhorin  wrote:
> >  Forwarded Message 
> > From: Ashis Kumar Ray 
> > To: m...@gnu.org, m...@mai2.rcnet.ru
> > Cc: Sukanta Das 
> > Subject: Help Needed
> > Date: Mon, 9 Apr 2012 18:11:45 +0530
> >
> >
> > Hi,
> >
> > We have plan to use GLPK Java utility JAR file and GLPK native solver to
> > get the linear programming solution as optimization engine for one of
> > our application.
> >
> > We are going to use JAR file for API but we are not changing or
> > extending anything in the JAR file as well as native solver.
> >
> > Can I use this for my application development and distribute to my
> > client?
> >
> > Thanks & Rgds,
> > Ashis Ray
> > Head – Technology & Solutions
> > SkyTECH Solutions Pvt Ltd
> > Tel: 91-33-23575441 Ext: 1002
> >
> > e-Mail: ash...@skytechsolutions.co.in
> >
> >
> >
> >
> >
> > ___
> > Help-glpk mailing list
> > Help-glpk@gnu.org
> > https://lists.gnu.org/mailman/listinfo/help-glpk
> >
> 
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk

-- 
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

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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-09 Thread Noli Sicad
> Did you mean "proprietary"? "Commercial" does not necessarily mean
> "proprietary".

Yes. "proprietary".

> Noli, please see the faq on the GPL:
> http://www.gnu.org/licenses/gpl-faq.html
> There are many nuances on how one can combine GPL'ed software.

We have discussion on issues on QGIS (GPL) forum. QGIS is GIS application.

Since the glpk java binding are free software distributed under the GNU GPL v3.

No question, it is all GPL.

However, if somebody releases source code /app that is LGPL, just to
interface with the interface solver (e.g. jar), then this is another
story.

GPL project + app that interface to GPL program (LGPL) + app that uses
the interface LGPL = "can be released a proprietary".

The GPL project source codes are "intacted" and also app that is
interface to GPL program as  distributed as LGPL.

It can be seen as:

GPL project + app (A) that interface to GPL program (LGPL) = GPL

App (A) that interface to GPL program (LGPL) + your code app = OK to
release as non-GPL.

Since the GPLK and Java API language binding are GPL, then scenario
mentioned above is out of the question.

Noli








On 4/10/12, Andrew Makhorin  wrote:
>> Xypon, What is the license of GLPK Java utility JAR file?
>>
>> The jar file is not linked to native solver, right? It is just
>> interface to the solver.
>>
>> Here my take on this issue.
>>
>> 
>>
>> GLPK native solver is GPL.
>>
>> C programs + GPLK (GPL) solver = Your Application (GPL).
>>
>> If  GLPK Java utility JAR file is:
>>
>> 1. GLPK Java Jar (LGPL) + GPLK (GPL) solver + your code = Your app is
>> OK to be released as LGPL /MIT / BSD / ( commercial).
>
> Did you mean "proprietary"? "Commercial" does not necessarily mean
> "proprietary".
>
>>
>>
>> 2. GLPK Java Jar (GPL) + GPLK (GPL) solver + your code = GPL.
>>
>> It is not OK to distribute your application without releasing all the
>> source code (GPL).
>>
>
> Noli, please see the faq on the GPL:
> http://www.gnu.org/licenses/gpl-faq.html
> There are many nuances on how one can combine GPL'ed software.
>
>

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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-09 Thread Andrew Makhorin
> Xypon, What is the license of GLPK Java utility JAR file?
> 
> The jar file is not linked to native solver, right? It is just
> interface to the solver.
> 
> Here my take on this issue.
> 
> 
> 
> GLPK native solver is GPL.
> 
> C programs + GPLK (GPL) solver = Your Application (GPL).
> 
> If  GLPK Java utility JAR file is:
> 
> 1. GLPK Java Jar (LGPL) + GPLK (GPL) solver + your code = Your app is
> OK to be released as LGPL /MIT / BSD / ( commercial).

Did you mean "proprietary"? "Commercial" does not necessarily mean
"proprietary".

> 
> 
> 2. GLPK Java Jar (GPL) + GPLK (GPL) solver + your code = GPL.
> 
> It is not OK to distribute your application without releasing all the
> source code (GPL).
> 

Noli, please see the faq on the GPL:
http://www.gnu.org/licenses/gpl-faq.html
There are many nuances on how one can combine GPL'ed software.


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


Re: [Help-glpk] [Fwd: Help Needed]

2012-04-09 Thread Noli Sicad
Xypon, What is the license of GLPK Java utility JAR file?

The jar file is not linked to native solver, right? It is just
interface to the solver.

Here my take on this issue.



GLPK native solver is GPL.

C programs + GPLK (GPL) solver = Your Application (GPL).

If  GLPK Java utility JAR file is:

1. GLPK Java Jar (LGPL) + GPLK (GPL) solver + your code = Your app is
OK to be released as LGPL /MIT / BSD / ( commercial).


2. GLPK Java Jar (GPL) + GPLK (GPL) solver + your code = GPL.

It is not OK to distribute your application without releasing all the
source code (GPL).

Noli










On 4/10/12, Andrew Makhorin  wrote:
>  Forwarded Message 
> From: Ashis Kumar Ray 
> To: m...@gnu.org, m...@mai2.rcnet.ru
> Cc: Sukanta Das 
> Subject: Help Needed
> Date: Mon, 9 Apr 2012 18:11:45 +0530
>
>
> Hi,
>
> We have plan to use GLPK Java utility JAR file and GLPK native solver to
> get the linear programming solution as optimization engine for one of
> our application.
>
> We are going to use JAR file for API but we are not changing or
> extending anything in the JAR file as well as native solver.
>
> Can I use this for my application development and distribute to my
> client?
>
> Thanks & Rgds,
> Ashis Ray
> Head – Technology & Solutions
> SkyTECH Solutions Pvt Ltd
> Tel: 91-33-23575441 Ext: 1002
>
> e-Mail: ash...@skytechsolutions.co.in
>
>
>
>
>
> ___
> Help-glpk mailing list
> Help-glpk@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-glpk
>

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


Re: [Help-glpk] [Fwd: help]

2011-11-27 Thread Michael Hennebry

On Sun, 27 Nov 2011, Andrew Makhorin wrote:


 Forwarded Message 
From: jjqcat jjqcat 
To: help-glpk@gnu.org
Subject: help
Date: Sat, 26 Nov 2011 23:07:23 +0800

Hi, I'm interested in GLPK and want to use it to solve my problem that is
fitness: a set of integer order

70.8 1 2 3 4 5 6 7 8
80.8 2 1 3 4 5 6 7 8
...
valuen1 n2 n3 n4 n5 n6 n7 n8

this problem is similar to TSP(traveling salesman problem), but I
dont't know how to find one combination to get best fitness value.



From the rather small amount of information available,

I expect that the problem is an assignment problem.
If so, every basic solution is all-integer.

--
Michael   henne...@web.cs.ndsu.nodak.edu
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword."  --  Lily

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


Re: [Help-glpk] [Fwd: help on interpreting sensitivity analysis]

2011-07-12 Thread Andrew Makhorin
> Thanks a lot for the quick reply. If my plot is incorrect then maybe it would 
> explain my doubts. However, I cannot see why it is incorrect. In your naming 
> of variables and constraints the xx axis would represent x1 and yy axis x2. 
> The blue line is c1, the red c2, and the yellow c3. The interior of the 
> triangle thus marks the feasible region.

On your plot I didn't find the point that corresponds to the basic
solution found by the solver. Just check it, may be I'm wrong.

> 
> If this is correct (please apologise if I'm making some basic mistake here), 
> then I don't understand how the current basis remain optimal for any positive
> objective coefficient after x1>=3.28571, as you said, since for approximately 
> x>6.5 there is no feasible region.
> 

If the obj coefficient at x1 is increasing, the current basis is *not*
changed remaining optimal for *any* positive obj. coefficient, i.e. x1
keeps its current value 3.28571. Please read the reference manual more
carefully.


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


Re: [Help-glpk] [Fwd: help on interpreting sensitivity analysis]

2011-07-12 Thread Marco Correia
On Tuesday 12 July 2011 23:43:14 Andrew Makhorin wrote:
> > I have just started learning LP and glpk so apologies if I'm missing
> > something important.
> > 
> > I setup a problem (using the c interface), composed of the three
> > following constraints, and no objective function:
> > 
> > 4.0*x0 - x1 <= 3.0
> > 3.0*x0 + x1 >= 8.0
> > 2.0*x0 + x1 <= 7.5
> > 
> > where x0 and x1 are unbounded, and correspond to column 1 and 2.
> > 
> > The pdf file in attachment shows the feasible region of this system (x0
> > is vertical axis). From the docs I understood that the column Activity
> > Range allows me to obtain (among other things) the ranges that each
> > variable may take in order for the problem to stay feasible and optimal.
> > Please see the output of the print_ranges function attached. It shows a
> > correct interval for x0, but the upper bound of x1 is not correct, it
> > should be almost 7 as shown in the chart.
> > 
> > I suppose I'm assuming something that I shouldn't. Could someone please
> > point me in the right direction?
> 
> You didn't assign names to rows and columns, so some information
> in the analysis report was lost.
> 
> I rewrote your instance in cplex lp format:
> 
> minimize
>z: 0 x0
> subject to
>r1: 4.0 x0 - x1 <= 3.0
>r2: 3.0 x0 + x1 >= 8.0
>r3: 2.0 x0 + x1 <= 7.5
> bounds
>x0 free
>x1 free
> End
> 
> and solved it with glpsol as follows:
> 
>glpsol --lp test.lp --ranges test.txt -o test.sol
> 
> In particular, for column x1 the analysis report (test.txt) says:
> 
> Column name: x1
> St:  BS
> Activity:3.28571
> Obj.coef:0.0
> Marginal:0.0
> Lower bound: -Inf
> Upper bound: +Inf
> 
> This means that in the current basis (which is optimal) x1 is basic, and
> its value is 3.28571.
> 
> If the objective coefficient at x1 is decreasing (first line):
> Activity range:  4.0
> Obj.coef.range:  0.0
> Obj.value at
> break point: 0.0
> Limiting variable:   r2
> 
> This means that if we would make the objective coefficient at x1 a bit
> less than zero (Obj.coef.range), the limiting variable, which is
> auxiliary variable r2, would enter the basis (that is, constraint r2
> would become inactive), and in the new adjacent optimal basis x1 would
> take on value 4.0.
> 
> If the objective coefficient at x1 is increasing (second line):
> Activity range:  3.28571
> Obj.coef.range:  +Inf
> Obj.value at
> break point: +Inf
> Limiting variable:   (none)
> 
> This means that the current basis remain optimal for any positive
> objective coefficient at x1.
> 
> Note that the analysis has different meaning for basic and non-basic
> rows/columns. For more details please see the glpk reference manual. And
> check your plot; it looks incorrect.

Hi Andrew,

Thanks a lot for the quick reply. If my plot is incorrect then maybe it would 
explain my doubts. However, I cannot see why it is incorrect. In your naming 
of variables and constraints the xx axis would represent x1 and yy axis x2. 
The blue line is c1, the red c2, and the yellow c3. The interior of the 
triangle thus marks the feasible region.

If this is correct (please apologise if I'm making some basic mistake here), 
then I don't understand how the current basis remain optimal for any positive
objective coefficient after x1>=3.28571, as you said, since for approximately 
x>6.5 there is no feasible region.

Thanks again!
Marco

-- 
Marco Correia 

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


Re: [Help-glpk] [Fwd: help on interpreting sensitivity analysis]

2011-07-12 Thread Andrew Makhorin
> I have just started learning LP and glpk so apologies if I'm missing 
> something 
> important.
> 
> I setup a problem (using the c interface), composed of the three following 
> constraints, and no objective function:
> 
> 4.0*x0 - x1 <= 3.0
> 3.0*x0 + x1 >= 8.0
> 2.0*x0 + x1 <= 7.5
> 
> where x0 and x1 are unbounded, and correspond to column 1 and 2.
> 
> The pdf file in attachment shows the feasible region of this system (x0 is 
> vertical axis). From the docs I understood that the column Activity Range 
> allows me to obtain (among other things) the ranges that each variable may 
> take in order for the problem to stay feasible and optimal. Please see the 
> output of the print_ranges function attached. It shows a correct interval for 
> x0, but the upper bound of x1 is not correct, it should be almost 7 as shown 
> in the chart.
> 
> I suppose I'm assuming something that I shouldn't. Could someone please point 
> me in the right direction?
> 

You didn't assign names to rows and columns, so some information
in the analysis report was lost.

I rewrote your instance in cplex lp format:

minimize
   z: 0 x0
subject to
   r1: 4.0 x0 - x1 <= 3.0
   r2: 3.0 x0 + x1 >= 8.0
   r3: 2.0 x0 + x1 <= 7.5
bounds
   x0 free
   x1 free
End

and solved it with glpsol as follows:

   glpsol --lp test.lp --ranges test.txt -o test.sol

In particular, for column x1 the analysis report (test.txt) says:

Column name: x1
St:  BS
Activity:3.28571
Obj.coef:0.0
Marginal:0.0
Lower bound: -Inf
Upper bound: +Inf

This means that in the current basis (which is optimal) x1 is basic, and
its value is 3.28571. 

If the objective coefficient at x1 is decreasing (first line):
Activity range:  4.0
Obj.coef.range:  0.0
Obj.value at
break point: 0.0
Limiting variable:   r2

This means that if we would make the objective coefficient at x1 a bit
less than zero (Obj.coef.range), the limiting variable, which is
auxiliary variable r2, would enter the basis (that is, constraint r2
would become inactive), and in the new adjacent optimal basis x1 would
take on value 4.0.

If the objective coefficient at x1 is increasing (second line):
Activity range:  3.28571
Obj.coef.range:  +Inf
Obj.value at
break point: +Inf
Limiting variable:   (none)

This means that the current basis remain optimal for any positive
objective coefficient at x1.

Note that the analysis has different meaning for basic and non-basic
rows/columns. For more details please see the glpk reference manual. And
check your plot; it looks incorrect.


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


Re: [Help-glpk] [Fwd: Help in if Statement]

2011-05-12 Thread Andrew Makhorin
On Thu, 2011-05-12 at 09:42 -0700, sina hamedheidari wrote:
> Hi Andrew,
> Thanks for your attention and your answer.
> Actually I want to make a little change in Knapsack model, I have the
> model itself from the GLPK distribution package.
> Surely you know the knapsack problem better than me.
> As you know "Selected" is the variable that restore selected items in
> binary mode (it's actually an array).
> I can see the value of "Selected" by 'display' keyword, but the
> problem is that I want to show the index of the first
> selected item in "Selected" array.
> for example if the sequence in "Selected" is like this:0 0 1 0 1 0 0 1
> The desire output would be 3.
> (3 is the index of the first selected item)
> 
> Regards.
> 
> Sina Hamedheidari
> 

Assuming that Items is a set of integers from 1 to n, the first in your
case means the least. So you can use the following statement:

printf "First item is %d\n", (min{i in Items: selected[i] = 1} i);



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


Re: [Help-glpk] [Fwd: Help in if Statement]

2011-05-12 Thread Andrew Makhorin
> I have a code that you can see it below, it does'nt seem to have error
> but when i compile it in GLPK the error is:
> "right parenthesis missing where expected
> Context: ...ms } printf ( if ( Selected [ i ] == 1 and c < 1 ) then c :=
> MathProg model processing error"
>  
> for {i in Items}
> printf(if (Selected[i]==1 and c<1)  then (c:=1 & "display: %d\n
> \n")),i;
> 
> c is a variable that its value is zero first.
> I want to make it 1 when I see the first 1 in Selected.
> Selected is an array  that has binary value.(var
> Selected{Items},binary;)
>  
> can anyone help me to fix this problem

The construction you use in the printf statement is syntactically
incorrect. Please explain in words what exactly do you need to model. 
Note that MathProg is not a procedural language. For example, unlike
programming languages it has no assignment statement.


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