Re: [Help-glpk] interfaces and platforms

2012-02-07 Thread name name
Let me explain and answer to your questions:

First, I have registed to the mailing list, second, I'm master student and
I'm writing my master thesis where I use GLPK in a OPEN SOURCE project(
https://bitbucket.org/pschaus/scampi/wiki/Home ) for this reason I would
like to have a source differant from wikipedia.

I dont see why you are so angry. Whot I do is using GLPK and writing in my
thesis.


On Mon, Feb 6, 2012 at 9:48 PM, Robbie Morrison rob...@actrix.co.nz wrote:


 Hello

 First up, you should register if you wish to post to
 this list.  That means the maintainer does not need to
 waste his time with cross-posting.

 Just curious as to why you think the GLPK wikibook is
 not reliable?  Our community (myself included) invest a
 fair bit effort in keeping it correct and current.  Can
 you point to any mistakes, for example?

 If you need to cite peer-reviewed literature for some
 reason, then you're pretty much outa luck.

 You need to remember that GLPK is an open source
 project.  We all take pride in producing good work and
 providing good support.  So whilst the controls on
 quality are not formal, as happens in scientific
 publishing, they are, nonetheless, active and vibrant.

 Maybe you could talk to your boss or supervisor and
 suggest that, in this case, well maintained open source
 documentation can be of high standard and should not be
 unceremoniously dismissed.  Conversely, my experiences
 with scientific peer-review have left me underwhelmed.

 In addition, much of the academic programming I've seen
 is just awful in relation to software engineering and
 good practice.  In contrast, GLPK is coded to a very
 high standard and is widely tested.

 HTH, Robbie

 
 To:   help-glpk help-glpk@gnu.org
 Subject:  Re: [Help-glpk] interfaces and platforms
 From: name name ono...@gmail.com
 Date: Mon, 6 Feb 2012 14:49:15 +0100
 

  I have seen that but i need some sources which are more
  relaible (it is for an project). Is there another
  source ?
 
  Thanks
 
  On Mon, Feb 6, 2012 at 2:25 PM, Andrew Makhorin m...@gnu.org wrote:
 
 
   Could you tell me in which platforms GLPK works and in which languages
   there are an interface for GLPK.
 
  Please see:
  http://en.wikipedia.org/wiki/GNU_Linear_Programming_Kit
  http://en.wikibooks.org/wiki/GLPK

 ---
 Robbie Morrison
 PhD student -- policy-oriented energy system simulation
 Institute for Energy Engineering (IET)
 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] interfaces and platforms

2012-02-07 Thread name name
In fact, I need source which is respected source.

I think it will be more respected source if the information was in the site
http://www.gnu.org/software/glpk/ or  http://bjoern.dapnet.de/glpk/ or in
the documantation which cames with glpk or in one of those sites.

My problem if not that I dont trast those informations or I think that it
is not corret but I think I would have problem if I citate those sites.

On Wed, Feb 8, 2012 at 5:55 AM, Michael Hennebry 
henne...@web.cs.ndsu.nodak.edu wrote:

 On Wed, 8 Feb 2012, Harley wrote:

  I think Robbie's comments were in response to the 'more reliable' part of
 your email. Robbie has worked very hard on the wikibook for GLPK and it is
 an excellent reference and it is not wikipedia as it has been created by
 the GLPK users but also has not been formally peer reviewed.

 Given that many participants on this list do not have English as their
 first language, we need to be careful about interpreting the intentions of
 the writer. I don't believe that Robbie's comments are angry just as I
 believe that there may have been a misunderstanding in the original email
 about the difference between wikipedia (not much standing in the academic
 world) and the GLPK wikibook that has been put together by the users of
 GLPK.


 My suspicion is that what is needed is not a more reliable source.
 What is needed is probably a more respected source.
 Quite possibly anything with wiki in the name is unacceptable.

 If reliability really is the issue, what is the measure of reliablilty?

 By any chance, would the information desired be in
 the documentation that comes in the GLPK tarball?

  I definitely would recommend reading the wikibook for GLPK as it does
 contain answers to your questions 
 (http://en.wikibooks.org/wiki/**GLPKhttp://en.wikibooks.org/wiki/GLPK
 ).

 Regards,

 Harley Mackenzie

 On 8/02/12 5:47 AM, name name wrote:

 Let me explain and answer to your questions:

 First, I have registed to the mailing list, second, I'm master student
 and I'm writing my master thesis where I use GLPK in a OPEN SOURCE project(
 https://bitbucket.org/pschaus/**scampi/wiki/Homehttps://bitbucket.org/pschaus/scampi/wiki/Home)
  for this reason I would like to have a source differant from wikipedia.

 I dont see why you are so angry. Whot I do is using GLPK and writing in
 my thesis.


 On Mon, Feb 6, 2012 at 9:48 PM, Robbie Morrison rob...@actrix.co.nzmailto:
 rob...@actrix.co.nz wrote:


Hello

First up, you should register if you wish to post to
this list.  That means the maintainer does not need to
waste his time with cross-posting.

Just curious as to why you think the GLPK wikibook is
not reliable?  Our community (myself included) invest a
fair bit effort in keeping it correct and current.  Can
you point to any mistakes, for example?

If you need to cite peer-reviewed literature for some
reason, then you're pretty much outa luck.

You need to remember that GLPK is an open source
project.  We all take pride in producing good work and
providing good support.  So whilst the controls on
quality are not formal, as happens in scientific
publishing, they are, nonetheless, active and vibrant.


 --
 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-glpkhttps://lists.gnu.org/mailman/listinfo/help-glpk

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


[Help-glpk] interfaces and platforms

2012-02-06 Thread name name
Dear all,


Could you tell me in which platforms GLPK works and in which languages
there are an interface for GLPK.

Thank you in advance

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


Re: [Help-glpk] interfaces and platforms

2012-02-06 Thread name name
I have seen that but i need some sources which are more relaible (it is for
an project). Is there another source ?

Thanks


On Mon, Feb 6, 2012 at 2:25 PM, Andrew Makhorin m...@gnu.org wrote:


  Could you tell me in which platforms GLPK works and in which languages
  there are an interface for GLPK.
 

 Please see:
 http://en.wikipedia.org/wiki/GNU_Linear_Programming_Kit
 http://en.wikibooks.org/wiki/GLPK


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


[Help-glpk] glp_get_status

2011-10-17 Thread name name
Hello,

For the LP model the whot is the value for the GLP_INFEAS (solution is
infeasible) ?
Is there another value for  the problems SUBOPTIMAL if not what the status
will send?

Thank you

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


Re: [Help-glpk] glp_get_status

2011-10-17 Thread name name
I solve LP model like this
glp_simplex(lp, parm)

I wont like to have the status of the solution to ba able to write something
like this

if(status ==optimal)...

else if (status== infisible)

how can I do that?

On Mon, Oct 17, 2011 at 6:45 PM, Robbie Morrison rob...@actrix.co.nzwrote:


 
 To:   name name ono...@gmail.com
 Subject:  Re: [Help-glpk] glp_get_status
 Message-ID:  1318860955.25925.18.camel@corvax
 From: Andrew Makhorin m...@gnu.org
 Date: Mon, 17 Oct 2011 18:15:55 +0400
 

  For the LP model the whot is the value for the
  GLP_INFEAS (solution is infeasible) ?
 
  Is there another value for the problems SUBOPTIMAL if
  not what the status will send?
 
  Your question is unclear. Please reformulate it.
 
  Solution statuses returned by glp_get_status,
  glp_get_prim_stat, and glp_get_dual_stat are described
  in the glpk reference manual included in the
  distribution.

 Follow up (not the clearest question in the world,
 I gota say):

 The code GLP_FEAS implies the current solution is
 suboptimal and the code GLP_OPT means an optimal
 solution has been found.

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


[Help-glpk] glpk_4_47_java.dll: Can't find dependent libraries

2011-10-12 Thread name name
Hello I have just downloaded glpk 4.47 for using in eclipce.

I put jar in the path and jar points to the file where is glpk_4_47_java.dll
and also glpk_4_47.dll

I got this error when I wont to use glpk.

The dynamic link library for GLPK for Java could not beloaded.
Consider using
java -Djava.library.path=
Exception in thread main java.lang.UnsatisfiedLinkError:
C:\Users\glpk_4_47_java.dll: Can't find dependent libraries

Can you tell me what is libraries should I add to the path?

Thank you

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


[Help-glpk] /opt/glpk/libglpk_java.so: undefined symbol: glp_error_hook

2011-10-07 Thread name name
Hello,

I'm using glpk with sbt

I have just installed glpk in this computer (to be able to use
or-toolshttp://code.google.com/p/or-tools/)and
I can't use glpk with sbt I got

/opt/glpk/libglpk_java.so: undefined symbol: glp_error_hook error

can you help me ?

Thank

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


Re: [Help-glpk] dual values

2011-10-06 Thread name name
I'm not interested in dual value of x_16 but  in others (x_1 to x_15)

I got

6.0  1.0  1.0  5.0  2.0  7.0  7.0  6.0  3.0  3.0  7.0  8.0  -22.0  2.0  5.0

sholdn't it be

6.0  1.0  1.0  5.0  2.0  7.0  0.0  6.0  3.0  3.0  0.0  0.0  0.0  2.0  5.0

?

On Thu, Oct 6, 2011 at 7:50 AM, glpk xypron xypron.g...@gmx.de wrote:

 Hello,

 you will have remarked that glpsol outputs:
 PROBLEM HAS NO DUAL FEASIBLE SOLUTION
 because any unbounded value of x_16 will solve the problem.

 If you add constraints for x_16 you will get the expected result, e.g.

 var x_1;
 var x_2;
 var x_3;
 var x_4;
 var x_5;
 var x_6;
 var x_7;
 var x_8;
 var x_9;
 var x_10;
 var x_11;
 var x_12;
 var x_13;
 var x_14;
 var x_15;
 var x_16, = 1, =0;

 minimize
  objective: + 6 * x_1 + x_2 + x_3 + 5 * x_4 + 2 * x_5 + 7 * x_6 + 7 * x_7 +
 6 * x_8
  + 3 * x_9 + 3 * x_10 + 7 * x_11 + 8 * x_12 + 8 * x_13 + 2 * x_14 + 5 *
 x_15;

 s.t. constraint1: + x_1 = 1;
 s.t. constraint2: + x_2 = 1;
 s.t. constraint3: + x_3 = 1;
 s.t. constraint4: + x_4 = 1;
 s.t. constraint5: + x_5 = 1;
 s.t. constraint6: + x_6 = 1;
 s.t. constraint7: + x_7 + x_16 = 1;
 s.t. constraint8: + x_8 = 1;
 s.t. constraint9: + x_9 = 1;
 s.t. constraint10: + x_10 = 1;
 s.t. constraint11: + x_16 + x_11 = 1;
 s.t. constraint12: + x_16 + x_12 = 1;
 s.t. constraint13: + x_13 + x_16 = 1;
 s.t. constraint14: + x_14 = 1;
 s.t. constraint15: + x_15 = 1;

 solve;

 printf x_7.dual=%f\n, x_7.dual;
 printf x_11.dual=%f\n,x_11.dual;
 printf x_12.dual=%f\n,x_12.dual;
 printf x_13.dual=%f\n,x_13.dual;

 end;

 Best regards

 Xypron

  Original-Nachricht 
  Datum: Wed, 5 Oct 2011 12:28:46 +0200
  Betreff: [Help-glpk] dual values

  Hello,
 
  I'm adding a column in a model and when I calculate the dual values I got
  wrong results
 
  Minimize
   objective: + 6 x_1 + x_2 + x_3 + 5 x_4 + 2 x_5 + 7 x_6 + 7 x_7 + 6 x_8
   + 3 x_9 + 3 x_10 + 7 x_11 + 8 x_12 + 8 x_13 + 2 x_14 + 5 x_15
 
  Subject To
   constraint1: + x_1 = 1
   constraint2: + x_2 = 1
   constraint3: + x_3 = 1
   constraint4: + x_4 = 1
   constraint5: + x_5 = 1
   constraint6: + x_6 = 1
   constraint7: + x_7 + x_16 = 1
   constraint8: + x_8 = 1
   constraint9: + x_9 = 1
   constraint10: + x_10 = 1
   constraint11: + x_16 + x_11 = 1
   constraint12: + x_16 + x_12 = 1
   constraint13: + x_13 + x_16 = 1
   constraint14: + x_14 = 1
   constraint15: + x_15 = 1
 
  End
 
  I have added x-16.
  Shouldn't the dual for the variables x_7, x_11 , x_12 and x_13 be equal
 to
  0
  ?
 
  Thank you
 
  Onor

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


[Help-glpk] dual values

2011-10-05 Thread name name
Hello,

I'm adding a column in a model and when I calculate the dual values I got
wrong results

Minimize
 objective: + 6 x_1 + x_2 + x_3 + 5 x_4 + 2 x_5 + 7 x_6 + 7 x_7 + 6 x_8
 + 3 x_9 + 3 x_10 + 7 x_11 + 8 x_12 + 8 x_13 + 2 x_14 + 5 x_15

Subject To
 constraint1: + x_1 = 1
 constraint2: + x_2 = 1
 constraint3: + x_3 = 1
 constraint4: + x_4 = 1
 constraint5: + x_5 = 1
 constraint6: + x_6 = 1
 constraint7: + x_7 + x_16 = 1
 constraint8: + x_8 = 1
 constraint9: + x_9 = 1
 constraint10: + x_10 = 1
 constraint11: + x_16 + x_11 = 1
 constraint12: + x_16 + x_12 = 1
 constraint13: + x_13 + x_16 = 1
 constraint14: + x_14 = 1
 constraint15: + x_15 = 1

End

I have added x-16.
Shouldn't the dual for the variables x_7, x_11 , x_12 and x_13 be equal to 0
?

Thank you

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


[Help-glpk] status of solution

2011-10-04 Thread name name
I solve lp problem ans I got status of solution 0 when it found the optimal
solution ans alos i got 0 when the problem has unbounded solution

How can I knew whit status if it has an optimal solution or not?


parm = new glp_smcp()
glp_init_smcp(parm)
status = GLPK.glp_simplex(lp, parm)


Thank you

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


Re: [Help-glpk] release memory

2011-09-09 Thread name name
I use ubuntu and run glpk with terminal.

when I run 1 example I the memory after termination of programme is 120mb
and If I run 5 times (in a for) the memory use is 300mb.

after termination I have

glp_delete_prob(lp)
glp_free_env() :the resulte is 0

On Thu, Sep 8, 2011 at 6:50 PM, Robbie Morrison rob...@actrix.co.nz wrote:


 
 To:   help-glpk help-glpk@gnu.org
 Subject:  [Help-glpk] release memory
 From: name name ono...@gmail.com
 Date: Thu, 8 Sep 2011 17:35:59 +0200
 

  Hello,
 
  I have some problem with releasing memory in scala.
 
  after solving model I use GLPK.glp_free_env() but the
  memory doesn't decries.

 [snip]

 Hello again Onor

 Did you check the return code from GLPK.glp_free_env()?

 The GLPK manual states:

  The routine 'glp_free_env' returns one of the following codes:
  0 = termination successful
  1 = environment is inactive (was not initialized).

 GLPK also provides the function 'glp_mem_usage' to
 report on memory usage.  If a wrapper is provided to
 this call, then that could be useful for troubleshooting
 your issue.

 HTH too, Robbie
 ---
 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


[Help-glpk] release memory

2011-09-08 Thread name name
Hello,

I have some problem with releasing memory in scala.

after solving model I use GLPK.glp_free_env() but the memory doesn't
decries.


Could you tell me how can I relese the memory ?

Thank you

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


[Help-glpk] type of variables

2011-09-05 Thread name name
Hello,

I have a very strange problem

I solve un Lp problem but the and the value of my  variables are not ineger
I got x(0,1)=0.2... even thaught when I print the type of my variables I got
3 coresponding to type binary( I got type to binary for all variables with
GLPK.glp_set_col_kind(lp, i, GLPKConstants.GLP_BV)).

Can you tell my where the problem could be?

Thank you

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


Re: [Help-glpk] type of variables

2011-09-05 Thread name name
On Mon, Sep 5, 2011 at 1:18 PM, Nigel Galloway nigel_gallo...@operamail.com
 wrote:

  Do you obtain this value with GLPK.glp_get_mip_col_val ?



no with .glp_set_col_kind
Even if the type of variable is binary Lp give non integer value

 --
  Nigel Galloway
  nigel_gallo...@operamail.com

   On Mon, 05 Sep 2011 09:52 +0200, name name ono...@gmail.com wrote:

 Hello,

 I have a very strange problem

 I solve un Lp problem but the and the value of my  variables are not ineger
 I got x(0,1)=0.2... even thaught when I print the type of my variables I got
 3 coresponding to type binary( I got type to binary for all variables with
 GLPK.glp_set_col_kind(lp, i, GLPKConstants.GLP_BV)).

 Can you tell my where the problem could be?

 Thank you

 Onor

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



 -- http://www.fastmail.fm - Email service worth paying for. Try it for free


 ___
 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


[Help-glpk] variable with the same lower ans upper bounds

2011-09-05 Thread name name
Hello,

In my problem I have some variables which has the same lover and upper
bounds and I got an error

column 1: lb = 0, ub = 0; incorrect bounds
The problem could not be solved


How can I solve this problem ?

Thank you

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


[Help-glpk] feasible solution for MIP

2011-08-16 Thread name name
Hello,

I have a hard MIP problem and glpk can't solve it.

How can I change the parameters for fining a feasible solution ?

Thank you

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


Re: [Help-glpk] The dynamic link library for GLPK for Java could not beloaded.

2011-08-11 Thread name name
I'm using from bst first run works but second I got

The dynamic link library for GLPK for Java could not beloaded.
Consider using
java -Djava.library.path=


I run as follow: java -Djava.library.path=/opt/glpk -Xmx512M -jar
/bin/sbt-launch.jar




On Wed, Jul 27, 2011 at 9:06 PM, Xypron xypron.g...@gmx.de wrote:

 **
 Dear Onor,

 the Java system parameter java.library.path defines the directories that
 are searched for native libraries.

 java.library.path should point to the directory where you have stored
 Linux: libglpk_java.so
 Windows: glpk_4_45_java.dll

 On Linux this path typically is /usr/local/lib/jni, or /usr/lib/jni.

 For example you could call your Java class like this:

 java -Djava.library.path=/usr/local/lib/jni MyClass

 If you start your program from Netbeans or Eclipse, you can save the
 parameter value in the project properties.

 Best regards

 Xypron



 On 27.07.2011 19:27, name name wrote:

 Hello,

 I have just change my java version and I can't run any more glpk
 I got
 The dynamic link library for GLPK for Java could not beloaded.
 Consider using
 java -Djava.library.path=

 whot should i do?
 how can I change java -Djava.library.path? where is it and where should I
 put it?

 thank you

 Onor


 ___
 Help-glpk mailing 
 listHelp-glpk@gnu.orghttps://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] implementing constraints in Scala

2011-08-08 Thread name name
I have this problem

\* Problem: Unknown *\

Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

End

After solving I got this

   No.   Row name   St Activity  Lower bound Upper bound Marginal
  --  -- - --- --- 
 1 constraint1  NL48  48  0.2
 2 constraint2  NL35  35  0.5
 3 constraint3  NL24  24  0.5
 4 constraint4  NL10  10  0.5
 5 constraint5  NL 8   81


then I pass to dual with

 GLPK.glp_get_row_dual(lp,rowId+1) (which give all 0)


I got error when I try to make bounds with
GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_DB, low, up)




On Fri, Aug 5, 2011 at 7:31 PM, glpk xypron xypron.g...@gmx.de wrote:

 Hello Onor,

 please, provide the Java code which produces the error.

 Best regards

 Xypron

  Original-Nachricht 
  Datum: Wed, 3 Aug 2011 15:09:33 +0200
  Betreff: Re: [Help-glpk] implementing constraints in Scala

  Hello again,
 
  I have  one more question :(
  This time I have a problem with dual
  I get dual (all the lines with GLPK.glp_get_col_dual(lp,colId+1)
  but just after when it's going to put bounds I got an error
 
  A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGSEGV (0xb) at pc=0x7f0cca36a1c4, pid=6605, tid=139692915328768
  #
  # JRE version: 6.0_26-b03
  # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode
  linux-amd64 compressed oops)
  # Problematic frame:
  # C  [libglpk.so.0+0x91c4]  __float128+0x14
 
 
  Whot can I do ?
 
  Thank you again
 
  Onor

 --
 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] implementing constraints in Scala

2011-08-08 Thread name name
My probleme is



Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

End

Optimal basic solution to my lpi s obtained with glpsol is the
following:

Rows:   5
Columns:5
Non-zeros:  5
Status: OPTIMAL
Objective:  objective = 52.1 (MINimum)


  No.   Row name   St Activity  Lower bound Upper bound Marginal
--  -- - --- --- 
 1 constraint1  NL48  48  0.2
2 constraint2  NL35  35  0.5
3 constraint3  NL24  24  0.5
4 constraint4  NL10  10  0.5
5 constraint5  NL 8   81

  No. Column name  St Activity  Lower bound Upper bound Marginal
--  -- - --- --- 
 1 x_1  B9.6   0
2 x_2  B   17.5   0
3 x_3  B 12   0
4 x_4  B  5   0
5 x_5  B  8   0


From here I wont to get the dual for all rows I should have
0.2
0.5
0.5
0.5
1

but I got 0 for all rows
I use  GLPK.glp_get_row_dual(lp,
rowId+1)

Can you tell me where the problem is?

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


[Help-glpk] problem with dual

2011-08-05 Thread name name
Hello,


I have a model like this.

When I try to get a dual I have all value 0.

GLPK.glp_get_col_dual(lp,colId+1) send 0 for all value.

How can I solve this problem?

Thank you

Onor

P.S. my model is

\* Problem: Unknown *\

Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

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


Re: [Help-glpk] problem with dual

2011-08-05 Thread name name
I printt model ans solution how shoud I understund that?


glp_print_sol give a this file


Problem:
Rows:   5
Columns:5
Non-zeros:  5
Status: UNDEFINED
Objective:  objective = 0 (MINimum)

   No.   Row name   St   Activity Lower bound   Upper boundMarginal
--  -- - - -
-
 1 constraint1  B  048
 2 constraint2  B  035
 3 constraint3  B  024
 4 constraint4  B  010
 5 constraint5  B  0 8

   No. Column name  St   Activity Lower bound   Upper boundMarginal
--  -- - - -
-
 1  NL 0 0   
eps
 2  NL 0 0   
eps
 3  NL 0 0   
eps
 4  NL 0 0   
eps
 5  NL 0 0   
eps

Karush-Kuhn-Tucker optimality conditions:

KKT.PE http://kkt.pe/: max.abs.err = 0.00e+00 on row 0
max.rel.err = 0.00e+00 on row 0
High quality

KKT.PB: max.abs.err = 4.80e+01 on row 1
max.rel.err = 9.80e-01 on row 1
PRIMAL SOLUTION IS INFEASIBLE

KKT.DE http://kkt.de/: max.abs.err = 1.00e+00 on column 1
max.rel.err = 5.00e-01 on column 1
DUAL SOLUTION IS WRONG

KKT.DB: max.abs.err = 0.00e+00 on row 0
max.rel.err = 0.00e+00 on row 0
High quality

End of output


glp_write_lp give this:


\* Problem: Unknown *\

Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

End

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


Re: [Help-glpk] problem with dual

2011-08-05 Thread name name
I printt model ans solution how shoud I understund that?


glp_print_sol give a this file


Problem:
Rows:   5
Columns:5
Non-zeros:  5
Status: UNDEFINED
Objective:  objective = 0 (MINimum)

   No.   Row name   St   Activity Lower bound   Upper boundMarginal
--  -- - - -
-
 1 constraint1  B  048
 2 constraint2  B  035
 3 constraint3  B  024
 4 constraint4  B  010
 5 constraint5  B  0 8

   No. Column name  St   Activity Lower bound   Upper boundMarginal
--  -- - - -
-
 1  NL 0 0   
eps
 2  NL 0 0   
eps
 3  NL 0 0   
eps
 4  NL 0 0   
eps
 5  NL 0 0   
eps

Karush-Kuhn-Tucker optimality conditions:

KKT.PE http://kkt.pe/: max.abs.err = 0.00e+00 on row 0
max.rel.err = 0.00e+00 on row 0
High quality

KKT.PB: max.abs.err = 4.80e+01 on row 1
max.rel.err = 9.80e-01 on row 1
PRIMAL SOLUTION IS INFEASIBLE

KKT.DE http://kkt.de/: max.abs.err = 1.00e+00 on column 1
max.rel.err = 5.00e-01 on column 1
DUAL SOLUTION IS WRONG

KKT.DB: max.abs.err = 0.00e+00 on row 0
max.rel.err = 0.00e+00 on row 0
High quality

End of output


glp_write_lp give this:

\* Problem: Unknown *\

Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

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


Re: [Help-glpk] problem with dual

2011-08-05 Thread name name
I can't see where the probleme is coming

model primar is

\* Problem: Unknown *\

Minimize
 objective: + x_1 + x_2 + x_3 + x_4 + x_5

Subject To
 constraint1: + 5 x_1 = 48
 constraint2: + 2 x_2 = 35
 constraint3: + 2 x_3 = 24
 constraint4: + 2 x_4 = 10
 constraint5: + x_5 = 8

End

I solve and get

getObjectiveValue
master obj:52.1

then I wont to pass a dual solution for this I do
GLPK.glp_get_col_dual(lp,colId+1) for all collone and I got this.
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


Re: [Help-glpk] problem with dual

2011-08-05 Thread name name
How can I get the upper bound for the rows?


  No.   Row name   St Activity  Lower bound Upper bound Marginal
--  -- - --- --- 
1 constraint1  NL48  48  0.2
2 constraint2  NL35  35  0.5
3 constraint3  NL24  24  0.5
4 constraint4  NL10  10  0.5
5 constraint5  NL 8   81


0.2
0.5
0.5
0.5
1

On Fri, Aug 5, 2011 at 4:38 PM, Andrew Makhorin m...@gnu.org wrote:

  I can't see where the probleme is coming
 
  model primar is
 
  \* Problem: Unknown *\
 
  Minimize
   objective: + x_1 + x_2 + x_3 + x_4 + x_5
 
  Subject To
   constraint1: + 5 x_1 = 48
   constraint2: + 2 x_2 = 35
   constraint3: + 2 x_3 = 24
   constraint4: + 2 x_4 = 10
   constraint5: + x_5 = 8
 
  End
 
  I solve and get
 
  getObjectiveValue
  master obj:52.1
 
  then I wont to pass a dual solution for this I do
  GLPK.glp_get_col_dual(lp,colId+1) for all collone and I got this.

 Optimal basic solution to your lp I obtained with glpsol is the
 following:

 Rows:   5
 Columns:5
 Non-zeros:  5
 Status: OPTIMAL
 Objective:  objective = 52.1 (MINimum)

   No.   Row name   St Activity  Lower bound Upper bound Marginal
 --  -- - --- --- 
  1 constraint1  NL48  48  0.2
 2 constraint2  NL35  35  0.5
 3 constraint3  NL24  24  0.5
 4 constraint4  NL10  10  0.5
 5 constraint5  NL 8   81

   No. Column name  St Activity  Lower bound Upper bound Marginal
 --  -- - --- --- 
  1 x_1  B9.6   0
 2 x_2  B   17.5   0
 3 x_3  B 12   0
 4 x_4  B  5   0
 5 x_5  B  8   0

 Note that all columns (variables) are basic at the optimum, so they all
 have zero reduced costs, that is, dual values.


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


Re: [Help-glpk] problem with dual

2011-08-05 Thread name name
When I use glp_get_row_dual(lp,rowId+1) I got 0 for all rows.

On Fri, Aug 5, 2011 at 5:48 PM, Andrew Makhorin m...@gnu.org wrote:

  How can I get the upper bound for the rows?

 With glp_get_row_ub. However, rows in your instance have no upper
 bounds.

 
 
No.   Row name   St Activity  Lower bound Upper bound Marginal
  --  -- - --- --- 
  1 constraint1  NL48  48  0.2
  2 constraint2  NL35  35  0.5
  3 constraint3  NL24  24  0.5
  4 constraint4  NL10  10  0.5
  5 constraint5  NL 8   81
 
 
  0.2
  0.5
  0.5
  0.5
  1
 

 These values are row duals, not upper bounds.

 Please consult any tutorial on lp basics.


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


Re: [Help-glpk] implementing constraints in Scala

2011-08-03 Thread name name
Hello again,

I have  one more question :(
This time I have a problem with dual
I get dual (all the lines with GLPK.glp_get_col_dual(lp,colId+1)
but just after when it's going to put bounds I got an error

A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x7f0cca36a1c4, pid=6605, tid=139692915328768
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode
linux-amd64 compressed oops)
# Problematic frame:
# C  [libglpk.so.0+0x91c4]  __float128+0x14


Whot can I do ?

Thank you again

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


Re: [Help-glpk] implementing constraints in Scala

2011-08-02 Thread name name
Thank you a lot

I have a little question that I didn't fine in glpk.pdf


How can I add a variable in the objective after creating objective (I can
have the coefficiente with GLPK.glp_get_obj_coef(lp,i) but I don't knew the
size of coefficient)?
Can I just add a variable without coping twice all coefficients?

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


Re: [Help-glpk] implementing constraints in Scala

2011-08-01 Thread name name
How can I print hole model, objective + constrains ?
Set the uper bount to infinity and get uper/lower bount of a variable?

On Sun, Jul 31, 2011 at 6:58 PM, glpk xypron xypron.g...@gmx.de wrote:

 Hello Onor,

 for (i - 0 to col.size-1) {
   GLPK.glp_set_obj_coef(lp, i,coef(i))
 }
 if you have n columns, GLPK number these 1 to n. You possibly
 wanted to write:
  GLPK.glp_set_obj_coef(lp, i + 1,coef(i))

 Cf. sample.c on page 15 of glpk-4.45/doc/glpk.pdf

GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_LO, 0,1000)
 The number 1000 will be ignored.
 The lower bound will be set to 0.

 Best regards

 Xypron

  Original-Nachricht 
  Datum: Sun, 31 Jul 2011 16:07:01 +0200
  Betreff: Re: [Help-glpk] implementing constraints in Scala

  thank you very much I have some more question
 
  there is a problem I got no solution and i dont knew why.
 
  Could you tell me in which function(s) is the problem?
 
  the contraints I did as you told me. I change only GLP_UP; FX
 
 
  startModelBuilding(nbRows : Int, nbCols : Int){
  lp = GLPK.glp_create_prob()
  GLPK.glp_add_cols(lp, nbCols)
  }
 
def setBounds(colId : Int, low : Double, up : Double) {
  GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_DB, low, up)
}
 
def setUnboundUpperBound(colId : Int) {
GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_LO, 0,1000)
}
 
  def addObjective(coef : Array[Double], col : Array[Int], minMode :
  Boolean = true) {
  GLPK.glp_set_obj_name(lp, objective);
  GLPK.glp_set_obj_dir(lp, if (minMode) GLPKConstants.GLP_MIN else
  GLPKConstants.GLP_MAX)
  for (i - 0 to col.size-1) {
GLPK.glp_set_obj_coef(lp, i,coef(i))
  }
  }
 
  def solveModel() : Int = {
println(solveModel);
  val iocp = new glp_iocp();
  GLPK.glp_init_iocp(iocp);
  iocp.setPresolve(
  GLPKConstants.GLP_ON);
  val ret = GLPK.glp_intopt(lp, iocp);
 
  if (ret == 0) {
sol = Array.tabulate(nbCols)(col = GLPK.glp_mip_col_val(lp,col
  +1))
objectiveValue = GLPK.glp_mip_obj_val(lp)
 
ret
  } else {
  System.out.println(The problem could not be solved);
  ret

 --
 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] implementing constraints in Scala

2011-07-31 Thread name name
thank you very much I have some more question

there is a problem I got no solution and i dont knew why.

Could you tell me in which function(s) is the problem?

the contraints I did as you told me. I change only GLP_UP; FX


startModelBuilding(nbRows : Int, nbCols : Int){
lp = GLPK.glp_create_prob()
GLPK.glp_add_cols(lp, nbCols)
}

  def setBounds(colId : Int, low : Double, up : Double) {
GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_DB, low, up)
  }

  def setUnboundUpperBound(colId : Int) {
  GLPK.glp_set_col_bnds(lp, colId+1, GLPKConstants.GLP_LO, 0,1000)
  }

def addObjective(coef : Array[Double], col : Array[Int], minMode :
Boolean = true) {
GLPK.glp_set_obj_name(lp, objective);
GLPK.glp_set_obj_dir(lp, if (minMode) GLPKConstants.GLP_MIN else
GLPKConstants.GLP_MAX)
for (i - 0 to col.size-1) {
  GLPK.glp_set_obj_coef(lp, i,coef(i))
}
}

def solveModel() : Int = {
  println(solveModel);
val iocp = new glp_iocp();
GLPK.glp_init_iocp(iocp);
iocp.setPresolve(
GLPKConstants.GLP_ON);
val ret = GLPK.glp_intopt(lp, iocp);

if (ret == 0) {
  sol = Array.tabulate(nbCols)(col = GLPK.glp_mip_col_val(lp,col
+1))
  objectiveValue = GLPK.glp_mip_obj_val(lp)

  ret
} else {
System.out.println(The problem could not be solved);
ret
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] implementing contrants in Scala

2011-07-28 Thread name name
I would like to implment glpk in scala.

def addConstraintLessEqual(coef : Array[Double], col : Array[Int], rhs :
Double) {
 nbRows += 1
GLPK.glp_add_rows(lp, 1);
GLPK.glp_set_row_name(lp, 1, constraint+nbRows);
GLPK.glp_set_row_bnds(lp, 1, GLPKConstants.GLP_UP, rhs, 0)
val ind = GLPK.new_intArray(col.size)
for (i - 1 to col.size) {
  GLPK.intArray_setitem(ind, i, col(i-1)+1);
}
val values = GLPK.new_doubleArray(col.size);
for (i - 1 to col.size) {
  GLPK.doubleArray_setitem(values, col(i-1)+1, coef(i-1));
}
GLPK.glp_set_mat_row(lp, nbRows, col.size, ind, values)
println(addConstraintLessEqual: end);
}



could you tell me where is the problem ?
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] The dynamic link library for GLPK for Java could not beloaded.

2011-07-27 Thread name name
Hello,

I have just change my java version and I can't run any more glpk
I got
The dynamic link library for GLPK for Java could not beloaded.
Consider using
java -Djava.library.path=

whot should i do?
how can I change java -Djava.library.path? where is it and where should I
put it?

thank you

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


[Help-glpk] installing glpk in java

2011-07-16 Thread name name
Hello,

I would like to use glpk in java could you tell me how can i do it?

Is there only one .so file to put in the pacege in java or two and where can
i find them.

Thank you

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


[Help-glpk] abs/min/max

2010-11-26 Thread name name
Hello,

Could you tell me how can I calculate

minimize obj :
max({i in 1..4}: abs(x[i]));

or
minimize obj :
max({i in 1..4}: min(x[i]);

Thank you
Onor
___
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk


[Help-glpk] abs

2010-11-20 Thread name name
Hello,

I want to calculate



var y,=0;



maximize obj:

abs(1-y);



fa:

...

fb:

...



solve;

...

data;

...

I get the argument for abs has invalide type, could you tell me how I could
do this?



Is it possible to solve the maximization probleme several times?



something like this





var y,=0;

{k in 1 .. 20} :

/* To get the solution for k=1, solution for k=2 ...*/

maximize obj:

abs(1-y);



fa:

...

fb:

...



solve;

...

data;

...



And the last question

How can I compile an model model.mod where the data is in a file model.dat



Thank you a lot

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


[Help-glpk] solving Linear Programming with glpsol

2010-11-04 Thread name name
Hi,

I would like to solve the linear programming with glpsol and i have some
problemes
Can you just tell me in which format should I write my minimisation and
maximisation problems and the commend line to solve them

P.S. the equations are max...
contrants

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