<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Numerical Optimization Forum]]></title>
		<link>http://forum.openopt.org/index.php</link>
		<description><![CDATA[The most recent posts in Numerical Optimization Forum.]]></description>
		<lastBuildDate>Sat, 12 May 2012 21:18:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Linear programming]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1704#p1704</link>
			<description><![CDATA[<p>My Problem is of the form f(x) - lambda ||x||_1. where f(x) = Ax, and lambda is some constant value and ||x||_1 is the first norm of x. x is the variable that I am trying to maximize. My constraints on x are all linear. </p><p>I hope this clears it up. This is a non linear function optimization. What is the best way to solve it?</p><p>Regards,<br />Sudhamsh.</p>]]></description>
			<author><![CDATA[dummy@example.com (Reddy)]]></author>
			<pubDate>Sat, 12 May 2012 21:18:31 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1704#p1704</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linear programming]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1703#p1703</link>
			<description><![CDATA[<p>I&#039;m not 100% sure I understand what is your f(x) and lambda, if you meant f =&nbsp; lambda * ||x||_1, you could try the following trick </p><p>lambda * sum(y) -&gt; min<br />s.t.<br />x &lt;= y (vectors)<br />x &gt;= -y (vectors)<br />other_required_constraints</p><p>you could also ask or-exchange.com</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Sat, 12 May 2012 19:27:13 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1703#p1703</guid>
		</item>
		<item>
			<title><![CDATA[Linear programming]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1702#p1702</link>
			<description><![CDATA[<p>Hi,</p><p>&nbsp; &nbsp;I am trying to solve a problem of the form:&nbsp; f(x) - lambda||x||1 (this term is the first norm of x). This in itself is not a linear program since lamba||x|| term makes in non-linear. Can anyone suggest how I could solve this? Ideally I would like to convert this into a linear program and use a LP solver. But, I can&#039;t seem to find a way to do that. </p><p>&nbsp; Any help or advise will be greatly appreciated.</p><p>Regards,<br />Sudhamsh.</p>]]></description>
			<author><![CDATA[dummy@example.com (Reddy)]]></author>
			<pubDate>Sat, 12 May 2012 19:14:02 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1702#p1702</guid>
		</item>
		<item>
			<title><![CDATA[DerApproximator has been ported to PyPy]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1701#p1701</link>
			<description><![CDATA[<p><a href="http://openopt.org/DerApproximator">DerApproximator</a> now works with <a href="http://pypy.org">PyPy</a>, the required code changes have been committed to subversion repository. </p><p>See a small benchmark results <a href="http://pastebin.com/CJHi8EBG">here</a></p><p>So, for vectorized functions CPython currently may work faster, because SSE are not implemented properly in PyPy yet.</p><p>According to a PyPy developer proposition I have filed a <a href="https://bugs.pypy.org/issue1140">bugreport</a> , but they will go for it after SSE branch.</p><p>These 211 elements of 544 are already present in PyPy (obtained via len(dir(numpy)), however, some of the items are modules):</p><p>False_ Inf Infinity NAN NINF NZERO NaN PINF PZERO True_ abs absolute add alen all alltrue amax amin any arange arccos arccosh arcsin arcsinh arctan arctan2 arctanh argmax argmin argsort around array array2string array_equal array_repr array_str arrayprint asanyarray asarray average base_repr bitwise_and bitwise_not bitwise_or bitwise_xor bool8 bool_ byte ceil character choose clip compress concatenate copysign core cos cosh count_reduce_items cumprod cumproduct cumsum deg2rad degrees diagonal divide dot dtype e empty equal exp exp2 expm1 fabs flatiter flexible float32 float64 float_ floating floor floor_divide fmax fmin fmod fromnumeric fromstring generic greater greater_equal identity inexact inf infty int16 int32 int64 int8 int_ intc integer intp invert isfinite isinf isna isnan isneginf isposinf left_shift less less_equal little_endian log log10 log1p log2 logaddexp logaddexp2 logical_and logical_not logical_or logical_xor longlong math max maximum mean min minimum multiarray multiply nan ndarray ndim negative newaxis nonzero not_equal number numeric ones pi power prod product ptp put pypy rad2deg radians rank ravel reciprocal repeat reshape resize right_shift round_ searchsorted set_string_function shape short sign signbit signedinteger sin sinh size sometrue sort sqrt square squeeze std str_ subtract sum swapaxes sys take tan tanh trace transpose true_divide trunc typeinfo ubyte ufunc uint16 uint32 uint64 uint8 uintc uintp ulonglong unicode_ unsignedinteger ushort var void where zeros</p><p>And for OpenOpt / FuncDesigner mostly these functions are missing in PyPy yet:</p><p>array_equal nanargmax hstack diag nanmin atleast_1d asscalar eye zeros_like tile empty_like array_equiv asfarray nanargmin vstack nansum copy diff cross flipud isscalar insert nanmax</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Tue, 08 May 2012 12:35:04 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1701#p1701</guid>
		</item>
		<item>
			<title><![CDATA[OpenOpt in Top-10 wikipedia most viewed optimization software]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1700#p1700</link>
			<description><![CDATA[<p><a href="http://openopt.org/">OpenOpt</a> in top-10 wikipedia most viewed mathematical optimization software entries from 38 taken into account in the category.</p><p>From the top-10 7 packages are proprietary, MPS is format (not software), and only 2 are free: GLPK (only linear problems, LP and MILP), and OpenOpt.</p><p>And OpenOpt is the only one package from the Top-10 with permissive license (BSD), that allows using it in any software, possibly commercial closed-source one.</p><p>See <a href="http://top-topics.thefullwiki.org/Mathematical_optimization_software">http://top-topics.thefullwiki.org/Mathe &#133; n_software</a></p><p>and local snapshots taken today: </p><p>&nbsp; &nbsp; Topic &nbsp; &nbsp; Wikipedia&nbsp; topic views (AFAIK for 2 weeks)<br />1 &nbsp; &nbsp; Mathematica &nbsp; &nbsp; 1,279 &nbsp; &nbsp; <br />2 &nbsp; &nbsp; CPLEX &nbsp; &nbsp; 126 &nbsp; &nbsp; <br />3 &nbsp; &nbsp; MPS (format) &nbsp; &nbsp; 96 &nbsp; &nbsp; <br />4 &nbsp; &nbsp; AMPL &nbsp; &nbsp; 89 &nbsp; &nbsp; <br />5 &nbsp; &nbsp; General Algebraic Modeling System &nbsp; &nbsp; 89 &nbsp; &nbsp; <br />6 &nbsp; &nbsp; GAUSS (software) &nbsp; &nbsp; 67 &nbsp; &nbsp; <br />7 &nbsp; &nbsp; GNU Linear Programming Kit &nbsp; &nbsp; 66 &nbsp; &nbsp; <br />8 &nbsp; &nbsp; MapleSim &nbsp; &nbsp; 61 &nbsp; &nbsp; <br />9 &nbsp; &nbsp; APMonitor &nbsp; &nbsp; 60 &nbsp; &nbsp; <br />10 &nbsp; &nbsp; OpenOpt &nbsp; &nbsp; 48 &nbsp; &nbsp; <br />11 &nbsp; &nbsp; ASCEND &nbsp; &nbsp; 43 &nbsp; &nbsp; <br />12 &nbsp; &nbsp; Concorde TSP Solver &nbsp; &nbsp; 29 &nbsp; &nbsp; <br />13 &nbsp; &nbsp; CUTEr &nbsp; &nbsp; 27 &nbsp; &nbsp; <br />14 &nbsp; &nbsp; IOSO &nbsp; &nbsp; 23 &nbsp; &nbsp; <br />15 &nbsp; &nbsp; SNOPT &nbsp; &nbsp; 20 &nbsp; &nbsp; <br />16 &nbsp; &nbsp; DIDO (optimal control) &nbsp; &nbsp; 20 &nbsp; &nbsp; <br />17 &nbsp; &nbsp; NMath &nbsp; &nbsp; 20 &nbsp; &nbsp; <br />18 &nbsp; &nbsp; TOMLAB &nbsp; &nbsp; 19 &nbsp; &nbsp; <br />19 &nbsp; &nbsp; ASTOS &nbsp; &nbsp; 18 &nbsp; &nbsp; <br />20 &nbsp; &nbsp; PROPT &nbsp; &nbsp; 18 &nbsp; &nbsp; <br />21 &nbsp; &nbsp; MCSim &nbsp; &nbsp; 17 &nbsp; &nbsp; <br />22 &nbsp; &nbsp; FortSP &nbsp; &nbsp; 16 &nbsp; &nbsp; <br />23 &nbsp; &nbsp; IPOPT &nbsp; &nbsp; 15 &nbsp; &nbsp; <br />24 &nbsp; &nbsp; KNITRO &nbsp; &nbsp; 15 &nbsp; &nbsp; <br />25 &nbsp; &nbsp; Nl (format) &nbsp; &nbsp; 14 &nbsp; &nbsp; <br />26 &nbsp; &nbsp; MINTO &nbsp; &nbsp; 12 &nbsp; &nbsp; <br />27 &nbsp; &nbsp; OPL Development Studio &nbsp; &nbsp; 12 &nbsp; &nbsp; <br />28 &nbsp; &nbsp; Gurobi &nbsp; &nbsp; 11 &nbsp; &nbsp; <br />29 &nbsp; &nbsp; Investigative Optimization Library &nbsp; &nbsp; 10 &nbsp; &nbsp; <br />30 &nbsp; &nbsp; Inverse (program) &nbsp; &nbsp; 8 &nbsp; &nbsp; <br />31 &nbsp; &nbsp; Galahad library &nbsp; &nbsp; 7 &nbsp; &nbsp; <br />32 &nbsp; &nbsp; TOMNET &nbsp; &nbsp; 7 &nbsp; &nbsp; <br />33 &nbsp; &nbsp; TOMVIEW &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; <br />34 &nbsp; &nbsp; FortMP &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; <br />35 &nbsp; &nbsp; MINOS (optimization software) &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; <br />36 &nbsp; &nbsp; PENOPT &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; <br />37 &nbsp; &nbsp; TomSym &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; <br />38 &nbsp; &nbsp; Madeline (software) &nbsp; &nbsp; less than 5 views &nbsp; &nbsp; </p><p><span class="postimg"><img src="http://openopt.org/images/3/33/opt_soft_trend.png" alt="rating" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Fri, 04 May 2012 19:52:27 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1700#p1700</guid>
		</item>
		<item>
			<title><![CDATA[Failed employment proposition]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1699#p1699</link>
			<description><![CDATA[<p>I had a preliminary employment proposition from a financial corporation (that uses OpenOpt) to go to their USA department in New York, unfortunately, they informed me that situation has changed and chances of this are close to zero.</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Tue, 01 May 2012 19:06:47 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1699#p1699</guid>
		</item>
		<item>
			<title><![CDATA[Re: IMPL with GLPK]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1698#p1698</link>
			<description><![CDATA[<div class="quotebox"><cite>Dmitrey wrote:</cite><blockquote><p>I&#039;ll not have computer with openopt and lpsolve installed sooner than tomorrow, currently you can replace those lines by <br />from numpy import asarray<br />lp_handle = List(asarray(...)),...<br />Pay attention that your example differs from openopt - you solve it before exporting. You&#039;d better try to export w/o solving before it.</p></blockquote></div><p>Yeah! that made the trick! because my matrix is uni-modular&nbsp; the results where always integers, so I could even get the sensitivity report. By the way just for improving OpenOpt when I export the MILP to MPS I couldn&#039;t get the solution with r=p.solve(&#039;glpk&#039;, iprint =-1, ) here is the output for the record:</p><p><strong>CODE:</strong></p><div class="codebox"><pre><code>Traceback (most recent call last):
  File &quot;C:\Users\Noone\Desktop\Universidad\Programación Matemática\tarea1.py&quot;, line 83, in &lt;module&gt;
    r=p.solve(&#039;glpk&#039;, iprint =-1, )
  File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\kernel\baseProblem.py&quot;, line 236, in solve
    return runProbSolver(self, *args, **kwargs)
  File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\kernel\runProbSolver.py&quot;, line 249, in runProbSolver
    solver(p)
  File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\solvers\CVXOPT\glpk_oo.py&quot;, line 16, in __solver__
    return CVXOPT_LP_Solver(p, &#039;glpk&#039;)
  File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\solvers\CVXOPT\CVXOPT_LP_Solver.py&quot;, line 19, in CVXOPT_LP_Solver
    xBounds2Matrix(p)
  File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\kernel\ooMisc.py&quot;, line 32, in xBounds2Matrix
    if p.useSparse is True or (isspmatrix(p.A) or (scipyInstalled and nLB+nUB&gt;=p.A.shape[0]) and p.useSparse is not False):
AttributeError: &#039;NoneType&#039; object has no attribute &#039;shape&#039;</code></pre></div><p>Thanks for everything Dmitrey! you saved my life!<br />I&#039;m in debt with you, anything u need ask me, I maybe not that good at programming, but I love it. </p><p>Regards Francisco</p>]]></description>
			<author><![CDATA[dummy@example.com (Francisco)]]></author>
			<pubDate>Fri, 27 Apr 2012 05:56:36 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1698#p1698</guid>
		</item>
		<item>
			<title><![CDATA[Re: IMPL with GLPK]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1697#p1697</link>
			<description><![CDATA[<p>I&#039;ll not have computer with openopt and lpsolve installed sooner than tomorrow, currently you can replace those lines by <br />from numpy import asarray<br />lp_handle = List(asarray(...)),...<br />Pay attention that your example differs from openopt - you solve it before exporting. You&#039;d better try to export w/o solving before it.</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Thu, 26 Apr 2012 19:59:58 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1697#p1697</guid>
		</item>
		<item>
			<title><![CDATA[Re: IMPL with GLPK]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1696#p1696</link>
			<description><![CDATA[<div class="quotebox"><cite>Dmitrey wrote:</cite><blockquote><p>hi,<br />ask cvxopt google group, I could implement it if and only if it&#039;s available via CVXOPT API.<br />Another solution could be export to MPS format file and edit it somehow or run by glpk binary with some options.<br />BTW I guess it would look much easier as FuncDesigner code.<br />Regards, D.</p></blockquote></div><p>OK, it&#039;s seems that the simplest solution was just to write it to MPS and then to run it directly with glpsol.exe (the GLPK binary), first i had a huge problem installing lpSolve, however I compiled it with the python binding (there wasn&#039;t an executable for python 2.7) , to get to know the exportToMps command i just copied the one example you have in your page, it didn&#039;t work, but it finds the solution to the problem using lpSolve, however the output will say lot more than my words:</p><p><strong>Code:</strong></p><div class="codebox"><pre><code># -*- coding: utf-8 -*-
&quot;&quot;&quot;
Created on Thu Apr 26 15:34:32 2012

@author: Noone
&quot;&quot;&quot;

from numpy import *
from openopt import MILP
from lp_solve import lpsolve 

f = [1, 2, 3, 4, 5, 4, 2, 1]
    
# indexing starts from ZERO!
# while in native lpsolve-python wrapper from 1
# so if you used [5,8] for native lp_solve python binding
# you should use [4,7] instead
intVars = [4, 7]

lb = -1.5 * ones(8)
ub = 15 * ones(8)
A = zeros((5, 8))
b = zeros(5)
for i in xrange(5):
    for j in xrange(8):
        A[i,j] = -8+sin(8*i) + cos(15*j)
    b[i] = -150 + 80*sin(80*i)

p = MILP(f=f, lb=lb, ub=ub, A=A, b=b, intVars=intVars)

# if file name not ends with &#039;.MPS&#039; or &#039;.mps&#039;
# then &#039;.mps&#039; will be appended
r=p.solve(&#039;lpSolve&#039;)
success = p.exportToMPS(&#039;milp_1&#039;)</code></pre></div><p><strong>Output: </strong></p><p>------------------------- OpenOpt 0.38 -------------------------<br />solver: lpSolve&nbsp; &nbsp;problem: unnamed&nbsp; &nbsp; type: MILP&nbsp; &nbsp;goal: minimum<br /> iter&nbsp; &nbsp;objFunVal&nbsp; &nbsp;log10(maxResidual)&nbsp; &nbsp;<br />&nbsp; &nbsp; 0&nbsp; 0.000e+00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.36 <br />OpenOpt Warning: <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; please install setproctitle module <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (it&#039;s available via easy_install and Linux soft channels like apt-get)<br />&nbsp; &nbsp; 1&nbsp; 2.580e+01&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -100.00 <br />istop: 1<br />Solver:&nbsp; &nbsp;Time Elapsed = 0.0 &nbsp; &nbsp; CPU Time Elapsed = 0.00237866210869<br />objFunValue: 25.801451 (feasible, MaxResidual = 0)<br />Traceback (most recent call last):<br />&nbsp; File &quot;C:\Users\Noone\Desktop\Universidad\Programación Matemática\tarea3.py&quot;, line 34, in &lt;module&gt;<br />&nbsp; &nbsp; success = p.exportToMPS(&#039;milp_1&#039;)<br />&nbsp; File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\kernel\LP.py&quot;, line 93, in exportToMPS<br />&nbsp; &nbsp; handler = self.get_lpsolve_handler(maxNameLength, startIndex)<br />&nbsp; File &quot;C:\Python27\lib\site-packages\openopt-0.38-py2.7.egg\openopt\kernel\LP.py&quot;, line 124, in get_lpsolve_handler<br />&nbsp; &nbsp; lp_handle = lp_maker(List(f.flatten()), List(self.Awhole), List(self.bwhole.flatten()), List(self.dwhole.flatten()), \<br />AttributeError: &#039;list&#039; object has no attribute &#039;flatten&#039;</p><br /><p>Regards, Francisco</p>]]></description>
			<author><![CDATA[dummy@example.com (Francisco)]]></author>
			<pubDate>Thu, 26 Apr 2012 19:24:06 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1696#p1696</guid>
		</item>
		<item>
			<title><![CDATA[Re: IMPL with GLPK]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1695#p1695</link>
			<description><![CDATA[<p>hi,<br />ask cvxopt google group, I could implement it if and only if it&#039;s available via CVXOPT API.<br />Another solution could be export to MPS format file and edit it somehow or run by glpk binary with some options.<br />BTW I guess it would look much easier as FuncDesigner code.<br />Regards, D.</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Wed, 25 Apr 2012 19:04:43 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1695#p1695</guid>
		</item>
		<item>
			<title><![CDATA[IMPL with GLPK]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1694#p1694</link>
			<description><![CDATA[<p>to be Ing Francisco Huerta, Universidad De los Andes, Santiago, Chile.</p><p>I&#039;m making a binary problem, i&#039;ve already installed CVOXPT with glpk for OpenOpt, Using Spyder IDE, on Windows 7 x64, and all works like a charm. But how do i do to call some specific glpk options, i want the sensitivity analysis, and to get more output from each point, cos its outputs like 3 points of 12800 or something, whatsoever this is my code:</p><p>import xlrd<br />from openopt import *<br />from numpy import *<br />#from cvxopt import *<br />wb = xlrd.open_workbook(&#039;datos.xls&#039;)<br />wb.sheet_names()</p><p>sh=wb.sheet_by_index(0)<br />m=[]<br />h=[]<br />p=[]<br />def chunks(l, inicio,largo):<br />&nbsp; &nbsp; return l[inicio:inicio+largo] </p><p>for rownum in range(80):#grupo 1<br />&nbsp; &nbsp; temp=sh.row_values(rownum+7)<br />&nbsp; &nbsp; m=m+chunks(temp, 8, 80)<br />&nbsp; &nbsp; #print m<br />&nbsp; &nbsp; h=h+chunks(temp, 92, 80)<br />&nbsp; &nbsp; <br />for rownum in range(673, 673+80):#maximo de hembras por perro<br />&nbsp; &nbsp; temp=sh.row_values(rownum)<br />&nbsp; &nbsp; p.append(temp[8])<br />&nbsp; &nbsp; #print p</p><p>#I=identity(80)<br />#lb = zeros(80**2*2)<br />#ub = ones(80**2*2)</p><p>#print ub<br />#print a[0]<br />#print I<br />def matriz(n):<br />&nbsp; &nbsp; #listoflists=[ [0]*4 ] *5<br />&nbsp; &nbsp; O=[ [0]*n**2*2 for y in range(n*3) ]<br />&nbsp; &nbsp;# print O<br />&nbsp; &nbsp; for x in range(n*2):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for z in range(x*n,((x+1)*n)):<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; O[x].insert(z,1)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; O[x].pop(z+1)<br />&nbsp; &nbsp; for x in range (n):<br />&nbsp; &nbsp; &nbsp; &nbsp; for z in range(n):&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; O[n*2+x].insert((z)*n+x,1)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; O[n*2+x].pop((z)*n+x+1)<br />&nbsp; &nbsp; return O<br />I=matriz(80)<br />#print I<br />#print I<br />pp=[1]*160</p><p>f = m+h<br />A=I<br />b=p<br />print size(b)<br />b=p+pp<br />print size(b)</p><p>print size(f)<br />print size(I[0])<br />print size(I)<br />print size (b)<br />binVars=range(80**2*2)<br />print size(binVars)<br />#print intVars<br />#p = MILP(f, A=A, b=b, lb=lb, ub=ub, intVars=intVars, goal=&#039;max&#039;)<br />p = MILP(f=f, A=A, b=b, binVars=binVars, goal=&#039;max&#039;)<br />r=p.solve(&#039;glpk&#039;, iprint =-1, )<br />#r.glp_print_ranges<br />print &#039;objFunValue:&#039;, r.ff<br />print &#039;x_opt:&#039;, r.xf</p><p><strong>the output:</strong></p><p>GLPK Integer Optimizer, v4.47<br />240 rows, 12800 columns, 19200 non-zeros<br />12800 integer variables, all of which are binary<br />Preprocessing...<br />240 rows, 12800 columns, 19200 non-zeros<br />12800 integer variables, all of which are binary<br />Scaling...<br /> A: min|aij| = 1.000e+000&nbsp; max|aij| = 1.000e+000&nbsp; ratio = 1.000e+000<br />Problem data seem to be well scaled<br />Constructing initial basis...<br />Size of triangular part = 240<br />Solving LP relaxation...<br />GLPK Simplex Optimizer, v4.47<br />240 rows, 12800 columns, 19200 non-zeros<br />*&nbsp; &nbsp; &nbsp;0: obj = -6.660000000e+002&nbsp; infeas = 0.000e+000 (0)<br />*&nbsp; &nbsp;345: obj = -1.289800000e+004&nbsp; infeas = 0.000e+000 (0)<br />OPTIMAL SOLUTION FOUND<br />Integer optimization begins...<br />+&nbsp; &nbsp;345: mip =&nbsp; &nbsp; &nbsp;not found yet &gt;=&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -inf&nbsp; &nbsp; &nbsp; &nbsp; (1; 0)<br />+&nbsp; &nbsp;345: &gt;&gt;&gt;&gt;&gt; -1.289800000e+004 &gt;= -1.289800000e+004&nbsp; &nbsp;0.0% (1; 0)<br />+&nbsp; &nbsp;345: mip = -1.289800000e+004 &gt;=&nbsp; &nbsp; &nbsp;tree is empty&nbsp; &nbsp;0.0% (0; 1)<br />INTEGER OPTIMAL SOLUTION FOUND<br />objFunValue: 12898.0<br />x_opt: [ 0.&nbsp; 0.&nbsp; 0. ...,&nbsp; 0.&nbsp; 0.&nbsp; 0.]</p><p>reading at glpk, the command option should be something like: glpsol ... --ranges file.sen<br />I know that glpsol it&#039;s the binary and not what we are using here...<br />maybe it should be something to be with the Informational APIs of glpk?</p><p>glp_print_ranges should print a human readable sensitivity analysis report</p><p>how do I call glpk with this option?</p><p>for your time thanks<br />regards<br />Francisco</p>]]></description>
			<author><![CDATA[dummy@example.com (Francisco)]]></author>
			<pubDate>Wed, 25 Apr 2012 18:39:16 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1694#p1694</guid>
		</item>
		<item>
			<title><![CDATA[interalg: categorical variables and general logical constraints]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1693#p1693</link>
			<description><![CDATA[<p>Hi OpenOpt users,<br />I&#039;m glad to inform you: now <a href="http://openopt.org/interalg">interalg</a> can handle categorical variables and general logical constraints, so now the solver is capable of solving <a href="http://openopt.org/GDP">GDP</a> (Generalized Disjunctive Programming), searching for global extrema with specifiable accuracy. Moreover, it can handle multiobjective problems with these data (<a href="http://trac.openopt.org/openopt/browser/PythonPackages/FuncDesigner/FuncDesigner/examples/categoricalVars.py">example</a>)</p><p>Modern solvers, e.g.&nbsp; <a href="http://openopt.org/LogMIP">LogMIP</a>, use Convex-Hull or Big-M algorithms for these nonlinear GDP, casting a GDP to series of <a href="http://openopt.org/MINLP">MINLP</a>, each one is usually solved by a sequence of (possibly nonconvex) <a href="http://openopt.org/NLP">NLP</a>, while interalg uses absolutely different method and doesn&#039;t create any auxiliary variables and problems. </p><p>See also updated chapters of <a href="http://openopt.org/FuncDesigner">FuncDesigner</a> doc: <a href="http://openopt.org/FuncDesignerDoc#Boolean_variables_and_functions">Boolean variables and functions</a> and <a href="http://openopt.org/FuncDesignerDoc#Discrete_and_categorical_variables">Discrete and categorical variables</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Tue, 24 Apr 2012 12:50:22 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1693#p1693</guid>
		</item>
		<item>
			<title><![CDATA[interalg scalability]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1692#p1692</link>
			<description><![CDATA[<p>Those tests in <a href="http://openopt.org/interalg_bench">interalg_bench</a> initially were done by OpenOpt v 0.34 with small-scaled functions (6 variables) and high accuracy (10^-9) (BTW most of them run much almost 2 times with current OpenOpt suite version 0.38). </p><p>Since the declared problems for <a href="http://openopt.org/interalg">interalg</a> are NP-Hard, sometimes it takes too long to get solution with required accuracy, but sometimes some problems with hundreds of variables were solved during several minutes by slow notebook (here&#039;s an <a href="http://trac.openopt.org/openopt/browser/PythonPackages/FuncDesigner/FuncDesigner/examples/interalg100vars.py">example</a> with 100 variables that takes less than 500 seconds on notebook Intel Atom 2 GHz, peak memory consumption 130 MB). Last OpenOpt svn snapshot was used, but I don&#039;t think difference with rev 0.38 will be essential in the case.</p><p>I expect essential speedup with PyPy (hey say several months till full NumPy support remains), also, I have some ideas for further interalg speedup.</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Mon, 23 Apr 2012 16:13:57 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1692#p1692</guid>
		</item>
		<item>
			<title><![CDATA[interalg improvements for boolean variables]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1691#p1691</link>
			<description><![CDATA[<p>some interalg improvements for handling boolean variables have been committed (you should have bool variables defined as &quot;...,domain = bool&quot;, not &quot;..., domain = [0,1]&quot;, that will work slower as general discrete variable; maybe I&#039;ll fix it later).</p>]]></description>
			<author><![CDATA[dummy@example.com (Dmitrey)]]></author>
			<pubDate>Thu, 19 Apr 2012 15:28:49 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1691#p1691</guid>
		</item>
		<item>
			<title><![CDATA[Re: bvls on 64bit Enthought]]></title>
			<link>http://forum.openopt.org/viewtopic.php?pid=1690#p1690</link>
			<description><![CDATA[<p>OK, I understand.</p><p>Anyway, it is admirable how quickly you manage to answer every questions!&nbsp; Thanks for your kind support.</p>]]></description>
			<author><![CDATA[dummy@example.com (kasal)]]></author>
			<pubDate>Wed, 18 Apr 2012 18:04:09 +0000</pubDate>
			<guid>http://forum.openopt.org/viewtopic.php?pid=1690#p1690</guid>
		</item>
	</channel>
</rss>

