Many thanks! Usually, I calculate some numbers of graph. Some are linear ones and some are SDP ones. I'm more familiar with Python, so I want to still to use it in sage as more as possible. And I have a prejudice that python could be faster than sage. :P
On Friday, January 20, 2017 at 3:45:42 PM UTC+1, Dima Pasechnik wrote: > > > > On Friday, January 20, 2017 at 2:32:12 PM UTC, Dima Pasechnik wrote: >> >> >> >> On Friday, January 20, 2017 at 12:31:40 PM UTC, [email protected] wrote: >>> >>> Thanks, I'm going to install the newest version of Sage. and `dsdp` is >>> supported also by default in the cvxopt of sage? >>> >> >> no, dsdp is not supported by default. >> > > In fact, we can include DSDP in sage with only a small effort. IIRC, some > years ago DSDP did not have any > license in its distro, which made it quite unclear as to who can use it > and how. (Or I overlooked it) > > Do you need to solve semidefinite optimisation problems (SDP)? >> What are the optimisation problems you are solving? >> Sage does have a much better (mixed integer) linear programming interface >> >> http://doc.sagemath.org/html/en/thematic_tutorials/linear_programming.html#linear-programming >> >> http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/mip.html >> >> than the one via cvxopt; it has many backends available, including >> backends to commercial >> solvers such as CPLEX etc. >> >> It also has a similar interface for SDP, see >> >> http://doc.sagemath.org/html/en/reference/numerical/sage/numerical/sdp.html >> (although the only backend available ATM is cvxopt) >> > > Sage also provides csdp as a package, although one cannot at present use > it as the backend to the > SDPs frontend. Someone has to work on this... > > >> >> >>> >>> On Friday, January 20, 2017 at 1:26:16 PM UTC+1, Dima Pasechnik wrote: >>>> >>>> There is something broken in your sage installation; for me the >>>> following works: >>>> >>>> c=vector(RDF,[-4,-5]) >>>> G=matrix(RDF,[[2,1],[1,2],[-1,0],[0,-1]]) >>>> h=vector(RDF,[3,3,0,0]) >>>> sol=linear_program(c,G,h,solver='glpk') >>>> sol['x'] >>>> >>>> ouput is >>>> >>>> GLPK Simplex Optimizer, v4.60 >>>> 4 rows, 2 columns, 6 non-zeros >>>> * 0: obj = 0.000000000e+00 inf = 0.000e+00 (2) >>>> * 2: obj = -9.000000000e+00 inf = 0.000e+00 (0) >>>> OPTIMAL LP SOLUTION FOUND >>>> (1.0, 1.0) >>>> >>>> In fact, BUILD_GLPK is set to 1 in the patch applied to cvxopt's >>>> setup.py at the time sage's cvxopt package >>>> is built, see build/pkgs/cvxopt/patches/setup.py.patch >>>> >>>> We will add a test in the docs, cf. >>>> https://trac.sagemath.org/ticket/22217 that I just opened. >>>> >>>> >>>> On Friday, January 20, 2017 at 12:11:37 PM UTC, Dima Pasechnik wrote: >>>>> >>>>> >>>>> >>>>> On Friday, January 20, 2017 at 11:44:46 AM UTC, [email protected] >>>>> wrote: >>>>>> >>>>>> When I run a program it tells me that >>>>>> `ValueError: invalid option (solver = 'glpk'): cvxopt.glpk is not >>>>>> installed`. >>>>>> >>>>>> Then I try to install cvxopt with glpk from source. That is, change >>>>>> BUILD_GLPK to 1 in the setup.py and then `python setup.py install` in >>>>>> the >>>>>> sage shell. But it gives me error that >>>>>> `error: command 'gcc' failed with exit status 1`. >>>>>> >>>>> >>>>> This actually should be fixed properly, in the sense that both glpk >>>>> and cvxopt are standard Sage packages, and so nothing should prevent >>>>> BUILD_GLPK=1 in cvxopt settings. >>>>> >>>>> In fact, I am under impression that it was working in the past, see >>>>> (very old) >>>>> https://trac.sagemath.org/ticket/9598 and >>>>> https://trac.sagemath.org/ticket/6456 >>>>> >>>>> >>>>> -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
