Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make openopt an optional spkg #6302

Closed
williamstein opened this issue Jun 15, 2009 · 16 comments
Closed

make openopt an optional spkg #6302

williamstein opened this issue Jun 15, 2009 · 16 comments

Comments

@williamstein
Copy link
Contributor

It's here:

http://sage.math.washington.edu/home/wstein/patches/openopt-0.24.spkg

Component: packages: optional

Author: William Stein

Reviewer: David Joyner, Harald Schilly

Merged: Sage 4.1.1.rc0

Issue created by migration from https://trac.sagemath.org/ticket/6302

@wdjoyner
Copy link

comment:1

This installs fine in 4.0.2.rc0 on ubuntu 9.04 amd64. Running tests now.

@wdjoyner
Copy link

comment:2

Passes sage -testall and also installs fine on a 10.4 macbook.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

Merged: sage-4.1.1.alpha0

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

comment:3

The optional package openopt-0.24.spkg is now in the optional packages repository at

http://www.sagemath.org/packages/optional/openopt-0.24.spkg

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

Reviewer: David Joyner

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

Author: William Stein

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Jul 19, 2009
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

Changed merged from sage-4.1.1.alpha0 to none

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 19, 2009

comment:4

After uncompressing

http://sage.math.washington.edu/home/wstein/patches/openopt-0.24.spkg

and doing hg status, I see lots of changes haven't been checked in. So I'm reopening this ticket. All changes need to be checked in via Mercurial. But note that the openopt project uses SVN for source code management.

@sagetrac-mvngu sagetrac-mvngu mannequin added the s: needs work label Jul 19, 2009
@sagetrac-mvngu sagetrac-mvngu mannequin reopened this Jul 19, 2009
@sagetrac-mvngu sagetrac-mvngu mannequin removed the s: needs work label Jul 19, 2009
@williamstein
Copy link
Contributor Author

comment:5

Replying to @sagetrac-mvngu:

After uncompressing

http://sage.math.washington.edu/home/wstein/patches/openopt-0.24.spkg

and doing hg status, I see lots of changes haven't been checked in.

No, that's wrong. Everything was checked in. The problem is that there was no hgignore, so all possible files that could get added to the repo (i.e. the stuff in src) got listed. I've added an .hgignore and rebuilt the spkg then posted it again in the optional package repo.

@haraldschilly
Copy link
Member

comment:6

installs fine on kbuntu 9.04/32bit /w sage 4.1. I'm able to run an arbitrary example from the openopt website as a test problem. It uses the "ralg" solver provided by openopt.

preparser(False)
from numpy import *
from openopt import NLP
n = 10
an = arange(n) # array [0, 1, 2, ..., n-1]
x0 = n+15*(1+cos(an))
f = lambda x: (x**2).sum() + sqrt(x**3-arange(n)**3).sum()
df = lambda x: 2*x + 0.5*3*x**2/sqrt(x**3-arange(n)**3)
c = lambda x: an**3 - x**3
dc = lambda x: diag(-3 * x**2)
lb = arange(n)
p = NLP(f, x0, df=df, lb=lb, c=c, dc=dc, iprint = 100, maxIter = 10000, maxFunEvals = 1e8)
r = p.solve('ralg')
# expected r.xf = [0, 1, 2, ..., n-1]
sage: r = p.solve('ralg')
-----------------------------------------------------
solver: ralg   problem: unnamed   goal: minimum
 iter    objFunVal    log10(maxResidual)
    0  9.129e+03            -100.00
  100  4.104e+03            -100.00
  169  2.878e+02            -100.00
istop:  3 (|| X[k] - X[k-1] || < xtol)
Solver:   Time Elapsed = 2.41   CPU Time Elapsed = 1.88
objFunValue: 287.75368 (feasible, max constraint =  0)

sage: # expected r.xf = [0, 1, 2, ..., n-1]
sage: r.xf

array([ 0.5964556 ,  1.00355187,  2.00415294,  3.00156818,  4.0012493 ,
        5.00080644,  6.00036981,  7.00052146,  8.00016061,  9.00015341])

@wdjoyner
Copy link

comment:7

What other tests need to be run before this can be given a positive review?

@haraldschilly
Copy link
Member

comment:8

Well, I've never reviewd a spkg before. So far as I can tell everything works as expected and therefore green light from me. Everything is only Python, and I think we can assume that it works on all platforms and there are no interferences with other parts of Sage, too.

@haraldschilly
Copy link
Member

Changed reviewer from David Joyner to David Joyner, Harald Schilly

@wdjoyner
Copy link

comment:9

Okay, me too. I'll change it to positive review then.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 29, 2009

Merged: Sage 4.1.1.rc0

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 29, 2009

comment:10

Merged in the optional spkg repository on the Sage website.

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Jul 29, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants