[sage-support] Re: openmpi
On 2013-01-31, Rachel Poe wrote: > Hi, > I'm trying to install the openmpi-1.4.3 package for my research and keep > getting this error: > > *** C compiler and preprocessor > checking for style of include used by make -j 1... none > checking for gcc... gcc > checking for C compiler default output file name... > configure: error: in > `/Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/spkg/build/openmpi-1.4.3/src': you are using an old version of Sage, 5.3. Could you update to 5.6 and check then? Best, Dmitrii -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] openmpi
Hi, I'm trying to install the openmpi-1.4.3 package for my research and keep getting this error: *** C compiler and preprocessor checking for style of include used by make -j 1... none checking for gcc... gcc checking for C compiler default output file name... configure: error: in `/Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/spkg/build/openmpi-1.4.3/src': configure: error: C compiler cannot create executables See `config.log' for more details. Error configuring real0m2.654s user0m0.387s sys 0m0.452s Error installing package openmpi-1.4.3 Please email sage-devel (http://groups.google.com/group/sage-devel) explaining the problem and including the relevant part of the log file /Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/spkg/logs/openmpi-1.4.3.log Describe your computer, operating system, etc. If you want to try to fix the problem yourself, *don't* just cd to /Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/spkg/build/openmpi-1.4.3 and type 'make' or whatever is appropriate. Instead, the following commands setup all environment variables correctly and load a subshell for you to debug the error: (cd '/Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/spkg/build/openmpi-1.4.3' && '/Applications/Sage-5.3-OSX-64bit-10.6.app/Contents/Resources/sage/sage' -sh) When you are done debugging, you can type "exit" to leave the subshell. How can I fix this to run openmpi? Thanks! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: wrong answer from MixedIntegerLinearProgram(solver = "PPL")
On 2013-01-29, dfrie...@gmail.com wrote: > Dmitrii, > > Thanks very much. Sorry for the dumb posting. I should have mentioned > in my posting that I'm just getting into MILP in Sage. > > Would it be equally dumb to post a question asking if there is an > arbitrary precision real arithmetic solver for MILP in Sage? (maybe a > version of GLPK?) Google just gives some old pages on the topic. it appears that GLPK has such a functionality (never tried it, nor even read docs :-)); someone has to integrate it in Sage... Should not be too much work, as GLPK is already (mostly) integrated. There are ways of dealing with low-dimensional ILP problems in Sage, involving enumerating all the integer points in the polytope. MILP is typically hard. If a normal precision MILP never produces an answer, typically arbirary precision won't help, either. Only for some really "bad" data an arbitrary precision MILP would be useful, although I actually saw such data working on bounds of quantum codes recently. Best, Dmitrii > > regards, > Daniel > > On 2013-01-29 3:37 PM, Dima Pasechnik wrote: >> On 2013-01-29, Daniel Friedan wrote: >>> --=_Part_964_12292304.1359472365223 >>> Content-Type: text/plain; charset=ISO-8859-1 >>> >>> The following example from Sage Reference v5.6 >> Numerical Optimization >> >>> Mixed integer linear programming >>>http://www.sagemath.org/doc/reference/sage/numerical/mip.html >>> gives a wrong answer when solver = 'PPL' is used. The equality constraints >>> are violated. >> >> No, they are not. Note that you round the output, >> which need not be integer. >> >> If in the last line you do >>print 'w_%s = %s' % (i, v) >> you get >> >> w_0 = 15/2 >> w_1 = 5 >> w_2 = 3/2 >> w_3 = 1 >> >> which is OK. >> >> The original example does integer LP, by the way (and PPL can't so it). >> So it's OK to round in this case, but not for an ordinary LP... >> >> Best, >> Dmitrii >>> >>> Sage 5.6-OSX-64bit-10.6 under OS X 10.6.8 >>> >>> sage: p = MixedIntegerLinearProgram(maximization=False, solver = "PPL") >>> sage: print p.base_ring() >>> sage: w = p.new_variable() >>> sage: p.add_constraint(w[0] + w[1] + w[2] - 14*w[3] == 0) >>> sage: p.add_constraint(w[1] + 2*w[2] - 8*w[3] == 0) >>> sage: p.add_constraint(2*w[2] - 3*w[3] == 0) >>> sage: p.add_constraint(w[0] - w[1] - w[2] >= 0) >>> sage: p.add_constraint(w[3] >= 1) >>> sage: _ = [ p.set_min(w[i], None) for i in range(1,4) ] >>> sage: p.set_objective(w[3]) >>> sage: p.show() >>> sage: print 'Objective Value:', p.solve() >>> sage: for i, v in p.get_values(w).iteritems():\ >>> sage: print 'w_%s = %s' % (i, int(round(v))) >>> >>> Rational Field >>> Minimization: >>>x_3 >>> Constraints: >>>constraint_0: 0 <= x_0 + x_1 + x_2 - 14 x_3 <= 0 >>>constraint_1: 0 <= x_1 + 2 x_2 - 8 x_3 <= 0 >>>constraint_2: 0 <= 2 x_2 - 3 x_3 <= 0 >>>constraint_3: - x_0 + x_1 + x_2 <= 0 >>>constraint_4: - x_3 <= -1 >>> Variables: >>>x_0 is a continuous variable (min=0, max=+oo) >>>x_1 is a continuous variable (min=-oo, max=+oo) >>>x_2 is a continuous variable (min=-oo, max=+oo) >>>x_3 is a continuous variable (min=-oo, max=+oo) >>> Objective Value: 1 >>> w_0 = 8 >>> w_1 = 5 >>> w_2 = 2 >>> w_3 = 1 >>> >>> >> > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Solve polynomial over ring
Thank you. On 30 January 2013 10:17, Charles Bouillaguet wrote: > On Jan 30, 2013, at 3:20 PM, Santanu Sarkar wrote: > > > > > N=8 > > R.=Integers(N)[] > > f=x^2-1 > > print f.roots() > > > Try : > > sage: print f.roots(multiplicities=False) > [1, 3, 5, 7] > > It's a start... > --- > Charles Bouillaguet > http://www.lifl.fr/~bouillaguet/ > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Sage versus Excel (spreadsheets in general): Are my arguments correct and complete?
On Wednesday, January 30, 2013 8:26:16 AM UTC-5, LFS wrote: > > Hi guys - I am sure that there is much more available. But actually > William you hit the nail on the head. The page I used was "a small > undergraduate student project" and its contents are useful and accessible. > That is the level I want - so a student or someone like me can use Sage in > place of MatLab or Mathematica in the undergraduate mathematics classroom > without getting bogged down in learning programming. To me, the problem is > that so often (a) I cannot find something basic or if I do: (b) I cannot > understand how to use it in Sage. Do a search for "sage statistics" or > "sage histogram" and you are immediately passed off to one or more of the > underlying programming languages each with its own specific syntax style. > For the first search, that one page is all there is for sage. For > histograms, I spent *many, many hours* searching before I wrote my first > comment in this thread. I found and tried every single one of the commands > in the "sage stat reference" pages. I did the scipy stuff. I could sort of > get an array with the counts and the bins if I worked at it really hard (I > had to separate out the returns), but I never could find a way to plot it. > I am sure there is some reference, but I could not find it. > Perhaps this: "a student or someone like me can use Sage in place of > MatLab or Mathematica in the undergraduate mathematics classroom" is not a > goal of Sage. However, my impression was that this was Unfortunately, I don't think we have enough people using Sage per se (as opposed to R or Scipy) for stats who would also have time and be willing to write exactly this worksheet! For instance, I am not a statistician, nor have ever taken a course in stats, so our attempt http://sage.maa.org/home/pub/24/ at this (see also http://trac.sagemath.org/sage_trac/ticket/13381 where this would enter the standard doc) is unfortunately one of the better pieces. It's a chicken-egg problem - we need people who use this stuff daily in the classroom to write such resources, but they aren't able to use Sage easily enough to be motivated to do so :( It is SO unfortunate that the sagenb.org published worksheets had to be turned off - often a half hour of searching there yielded untold stores of fruit. Thanks for your feedback and efforts; they really are appreciated. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Solve polynomial over ring
On Jan 30, 2013, at 3:20 PM, Santanu Sarkar wrote: > > N=8 > R.=Integers(N)[] > f=x^2-1 > print f.roots() Try : sage: print f.roots(multiplicities=False) [1, 3, 5, 7] It's a start... --- Charles Bouillaguet http://www.lifl.fr/~bouillaguet/ -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Solve polynomial over ring
I want to solve a polynomial over ring. However my code does not work. N=8 R.=Integers(N)[] f=x^2-1 print f.roots() In my case, N is always a power of 2. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Sage versus Excel (spreadsheets in general): Are my arguments correct and complete?
Hi guys - I am sure that there is much more available. But actually William you hit the nail on the head. The page I used was "a small undergraduate student project" and its contents are useful and accessible. That is the level I want - so a student or someone like me can use Sage in place of MatLab or Mathematica in the undergraduate mathematics classroom without getting bogged down in learning programming. To me, the problem is that so often (a) I cannot find something basic or if I do: (b) I cannot understand how to use it in Sage. Do a search for "sage statistics" or "sage histogram" and you are immediately passed off to one or more of the underlying programming languages each with its own specific syntax style. For the first search, that one page is all there is for sage. For histograms, I spent *many, many hours* searching before I wrote my first comment in this thread. I found and tried every single one of the commands in the "sage stat reference" pages. I did the scipy stuff. I could sort of get an array with the counts and the bins if I worked at it really hard (I had to separate out the returns), but I never could find a way to plot it. I am sure there is some reference, but I could not find it. Perhaps this: "a student or someone like me can use Sage in place of MatLab or Mathematica in the undergraduate mathematics classroom" is not a goal of Sage. However, my impression was that this was one of the goals and it was the reason I started to use it and work at it (and build my own wiki and youtube channel - places that explain the basic stuff). I am not complaining, but rather explaining that "massive" and "complete" is not always that helpful in the undergraduate (and even graduate) math classroom. Finally, thanks always to everyone for replying any which way to my questions. An active forum is a blessing and one of the many excellent points of Sage. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Hpow to upgrade old notebooks
This user has asked this question multiple times, and if there isn't something strange about the computer, this is a fairly significant and unexpected regression, presumably due to the new(est) "Flask" notebook changes. I have to say that we haven't heard much about it, but then again perhaps not everyone has OpenID accounts going on. exceptions.AttributeError: 'OpenIDUserManager' object has no attribute 'default_user' @mmarco: That said, it seems unlikely to me that it's universal to Sage upgrades, since many of us haven't had problems with keeping the same notebooks for many, many versions, and e.g. sagenb.org hasn't lost any of its in upgrading. Is there ANY unusual setting you have on this machine, perhaps to do with how people are asked to log in to this server? On Jan 30, 6:51 am, mmarco wrote: > I don't know if it is the right place to ask this. I have asked in > sage-notebook list but got no response. > > The problem is that i am running a server with sage 5.2 version. Now i > want to upgrade to sage 5.6, but the notebook directory seems to be > incompatible somehow. > > When i try to run it, and access to the server with a browser, i get > the following message: > > sage@sage-server:~$ sage56 -notebook > directory="sage_notebook_fis.sagenb" > -- > | Sage Version 5.6, Release Date: 2013-01-21 | > | Type "notebook()" for the browser-based notebook interface. | > | Type "help()" for help. | > -- > > Please wait while the Sage Notebook server starts... > notebook(directory=r'''sage_notebook_fis.sagenb''') > The notebook files are stored in: sage_notebook_fis.sagenb > ** > * * > * Open your web browser tohttp://localhost:8080* > * * > ** > Executing twistd --pidfile="sage_notebook_fis.sagenb/sagenb.pid" -ny > "sage_notebook_fis.sagenb/twistedconf.tac" > 2013-01-30 12:50:41+0100 [-] Log opened. > 2013-01-30 12:50:41+0100 [-] twistd 12.1.0 (/usr/local/sage-5.6/local/ > bin/python 2.7.3) starting up. > 2013-01-30 12:50:41+0100 [-] reactor class: > twisted.internet.epollreactor.EPollReactor. > 2013-01-30 12:50:41+0100 [-] QuietSite starting on 8080 > 2013-01-30 12:50:41+0100 [-] Starting factory <__builtin__.QuietSite > instance at 0x4428bd8> > No protocol specified > xprop: unable to open display ':0.0' > No protocol specified > > (chromium-browser:14962): Gtk-WARNING **: cannot open display: :0.0 > 2013-01-30 12:50:51+0100 [-] WSGI application error > Traceback (most recent call last): > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", > line 167, in _worker > result = context.call(ctx, function, *args, **kwargs) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line > 118, in callWithContext > return self.currentContext().callWithContext(ctx, func, *args, > **kw) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line > 81, in callWithContext > return func(*args,**kw) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 332, > in run > self.reactor.callFromThread(wsgiError, self.started, *exc_info()) > --- --- > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 315, > in run > appIterator = self.application(self.environ, self.startResponse) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Flask-0.9-py2.7.egg/flask/app.py", line 1701, in __call__ > return self.wsgi_app(environ, start_response) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Flask-0.9-py2.7.egg/flask/app.py", line 1689, in wsgi_app > response = self.make_response(self.handle_exception(e)) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Flask-0.9-py2.7.egg/flask/app.py", line 1687, in wsgi_app > response = self.full_dispatch_request() > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Flask-0.9-py2.7.egg/flask/app.py", line 1360, in full_dispatch_request > rv = self.handle_user_exception(e) > File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ > Flask-0.9-py2.7.egg/flask/app.py", line 1358, in full_dispatch_request > rv = self.dispatch_reque
[sage-support] How to upgrade old notebooks.
I don't know if it is the right place to ask this. I have asked in sage-notebook list but got no response. The problem is that i am running a server with sage 5.2 version. Now i want to upgrade to sage 5.6, but the notebook directory seems to be incompatible somehow. When i try to run it, and access to the server with a browser, i get the following message: sage@sage-server:~$ sage56 -notebook directory="sage_notebook_fis. sagenb" -- | Sage Version 5.6, Release Date: 2013-01-21 | | Type "notebook()" for the browser-based notebook interface.| | Type "help()" for help.| -- Please wait while the Sage Notebook server starts... notebook(directory=r'''sage_notebook_fis.sagenb''') The notebook files are stored in: sage_notebook_fis.sagenb ** ** * Open your web browser to http://localhost:8080 * ** ** Executing twistd --pidfile="sage_notebook_fis.sagenb/sagenb.pid" -ny "sage_notebook_fis.sagenb/twistedconf.tac" 2013-01-30 12:50:41+0100 [-] Log opened. 2013-01-30 12:50:41+0100 [-] twistd 12.1.0 (/usr/local/sage-5.6/local/ bin/python 2.7.3) starting up. 2013-01-30 12:50:41+0100 [-] reactor class: twisted.internet.epollreactor.EPollReactor. 2013-01-30 12:50:41+0100 [-] QuietSite starting on 8080 2013-01-30 12:50:41+0100 [-] Starting factory <__builtin__.QuietSite instance at 0x4428bd8> No protocol specified xprop: unable to open display ':0.0' No protocol specified (chromium-browser:14962): Gtk-WARNING **: cannot open display: :0.0 2013-01-30 12:50:51+0100 [-] WSGI application error Traceback (most recent call last): File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 167, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 332, in run self.reactor.callFromThread(wsgiError, self.started, *exc_info()) --- --- File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/web/wsgi.py", line 315, in run appIterator = self.application(self.environ, self.startResponse) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1701, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1689, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1687, in wsgi_app response = self.full_dispatch_request() File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1360, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1358, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/sage-5.6/local/lib/python2.7/site-packages/ Flask-0.9-py2.7.egg/flask/app.py", line 1344, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/sage-5.6/devel/sagenb/flask_version/base.py", line 117, in index return login() File "/usr/local/sage-5.6/devel/sagenb/flask_version/ authentication.py", line 24, in login 'default_user': g.notebook.user_manager().default_user(), exceptions.AttributeError: 'OpenIDUserManager' object has no attribute 'default_user' And nothing shows in the bowser. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group
[sage-support] Re: Sage versus Excel (spreadsheets in general): Are my arguments correct and complete?
On Tuesday, January 29, 2013 11:47:35 PM UTC+1, Jason Grout wrote: > > When we upgrade numpy [1], we should also seriously look at including > pandas [2] > big +1 from me. And I would also like to see statsmodels :-) http://statsmodels.sourceforge.net/ H -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Re: wrong answer from MixedIntegerLinearProgram(solver = "PPL")
Dmitrii, Thanks very much. Sorry for the dumb posting. I should have mentioned in my posting that I'm just getting into MILP in Sage. Would it be equally dumb to post a question asking if there is an arbitrary precision real arithmetic solver for MILP in Sage? (maybe a version of GLPK?) Google just gives some old pages on the topic. regards, Daniel On 2013-01-29 3:37 PM, Dima Pasechnik wrote: On 2013-01-29, Daniel Friedan wrote: --=_Part_964_12292304.1359472365223 Content-Type: text/plain; charset=ISO-8859-1 The following example from Sage Reference v5.6 >> Numerical Optimization >> Mixed integer linear programming http://www.sagemath.org/doc/reference/sage/numerical/mip.html gives a wrong answer when solver = 'PPL' is used. The equality constraints are violated. No, they are not. Note that you round the output, which need not be integer. If in the last line you do print 'w_%s = %s' % (i, v) you get w_0 = 15/2 w_1 = 5 w_2 = 3/2 w_3 = 1 which is OK. The original example does integer LP, by the way (and PPL can't so it). So it's OK to round in this case, but not for an ordinary LP... Best, Dmitrii Sage 5.6-OSX-64bit-10.6 under OS X 10.6.8 sage: p = MixedIntegerLinearProgram(maximization=False, solver = "PPL") sage: print p.base_ring() sage: w = p.new_variable() sage: p.add_constraint(w[0] + w[1] + w[2] - 14*w[3] == 0) sage: p.add_constraint(w[1] + 2*w[2] - 8*w[3] == 0) sage: p.add_constraint(2*w[2] - 3*w[3] == 0) sage: p.add_constraint(w[0] - w[1] - w[2] >= 0) sage: p.add_constraint(w[3] >= 1) sage: _ = [ p.set_min(w[i], None) for i in range(1,4) ] sage: p.set_objective(w[3]) sage: p.show() sage: print 'Objective Value:', p.solve() sage: for i, v in p.get_values(w).iteritems():\ sage: print 'w_%s = %s' % (i, int(round(v))) Rational Field Minimization: x_3 Constraints: constraint_0: 0 <= x_0 + x_1 + x_2 - 14 x_3 <= 0 constraint_1: 0 <= x_1 + 2 x_2 - 8 x_3 <= 0 constraint_2: 0 <= 2 x_2 - 3 x_3 <= 0 constraint_3: - x_0 + x_1 + x_2 <= 0 constraint_4: - x_3 <= -1 Variables: x_0 is a continuous variable (min=0, max=+oo) x_1 is a continuous variable (min=-oo, max=+oo) x_2 is a continuous variable (min=-oo, max=+oo) x_3 is a continuous variable (min=-oo, max=+oo) Objective Value: 1 w_0 = 8 w_1 = 5 w_2 = 2 w_3 = 1 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] How to use Sage with Eclipse on Windows 7
Hi, I am a new user of Sage. I have installed Python, Aptana Studio 3 and Sage (using VM Virtualbox). I found following explanation on this group but it is still confusing for me to setup. http://www.mailinglistarchive.com/html/sage-support@googlegroups.com/2012-01/msg00011.html it says that 1. set PyDev python interpreter to Sage windows: preferences: PyDev: Interpreter Python: new: /sage/local/bin/ python2.6 Now in my case python is separate installation at (C:\python27) and Sage in located in VM Virtualbox folder. There is no local/bin path in sage folder. Anyone can please explain this step for me? Thanks in advance Assad -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: parametric_plot and xmin/xmax
Thanks. If asked, I vote for "opacity". It is memorable. :) On Wednesday, 30 January 2013 10:34:04 UTC+1, P Purkayastha wrote: > > On 01/30/2013 05:02 PM, LFS wrote: > > I don't know if you are desperate (then this is a decent idea) or trying > > to teach others (not so good an idea) > > When desperate, I add invisible points and use show(). (Unfortunately > > invisible points depend on your plot type since alpha=0 is for 2d and > > opacity=0 is for 3d...HINT to developers to change this...) > > Thanks. This has been added to http://trac.sagemath.org/13828 > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: parametric_plot and xmin/xmax
On 01/30/2013 05:02 PM, LFS wrote: I don't know if you are desperate (then this is a decent idea) or trying to teach others (not so good an idea) When desperate, I add invisible points and use show(). (Unfortunately invisible points depend on your plot type since alpha=0 is for 2d and opacity=0 is for 3d...HINT to developers to change this...) Thanks. This has been added to http://trac.sagemath.org/13828 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: parametric_plot and xmin/xmax
I don't know if you are desperate (then this is a decent idea) or trying to teach others (not so good an idea) When desperate, I add invisible points and use show(). (Unfortunately invisible points depend on your plot type since alpha=0 is for 2d and opacity=0 is for 3d...HINT to developers to change this...) t = var('t') PP=parametric_plot( (cos(t), sin(t)), (t, 0, 2*pi)) Bx=point([(-2, -2),(2,2)], alpha=0) show(PP+Bx) for 3d example see: http://sagemath.wikispaces.com/point3d example 3 On Monday, 21 January 2013 01:01:25 UTC+1, Robert Jacobson wrote: > > Setting xmin/xmax for parametric_plot doesn't seem to do anything, but > ymin/ymax work as expected. What am I doing wrong? > > t = var('t') > parametric_plot( (cos(t), sin(t)), (t, 0, 2*pi), xmin=-2, xmax=2, ymin=-2, > ymax=2) > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.