ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 03 Mar 2019 15:50:46 -0600What software does Sage use to solve linear equations ?http://ask.sagemath.org/question/45633/what-software-does-sage-use-to-solve-linear-equations/Hi, I have been using Sage in my project mainly to solve a large list of large (hundred of unknowns) linear equations, i.e., `solve(eqts, variable)`. However, Sage is so large that it becomes inconvenient to ask users to download Sage to use my work. I've tried to use `sympy` but its equation solver is much slower compare to the one in Sage. So I am wondering what software that Sage uses underneath for linear equation solving ? It's probably one of those listed here http://www.sagemath.org/links-components.html but I don't know which.
Note that I want a solver that can give symbolic solution, e.g., instead of solutions such as `x = 3, y =6`, it would say `x = v1, y = 2*v1`. This is how I use `solve` in Sage.nguyenthanhvuhSun, 03 Mar 2019 15:50:46 -0600http://ask.sagemath.org/question/45633/Scatter search optimisationhttp://ask.sagemath.org/question/39655/scatter-search-optimisation/Hi all,
Does Sage offer something similar to the scatter search algorithms (Global Optimisation Toolbox) in Matlab? I looked through Sage documentation and through this forum but couldn't find a comprehensive answer.
Bit of background: I have a model with 6 parameters that together govern two probability distributions, looking to minimise error between calculated output and a target consisting of 4 variables. The probability distribution interacts with 1,000 - 100,000 data points to give a yes/no decision for each so they can be included/excluded in a sub-sample of data.
Excel (Evolutionary Solver) runs this in 1 - 24hr (admittedly on a 64Gb ram/12 core work station) so understandably I would like to speed this up. Python looks a sensible way to go, which brought me to Sage, but I got stuck trying to find out what optimisation algorithms are available.
SloopJohnBSat, 18 Nov 2017 16:46:44 -0600http://ask.sagemath.org/question/39655/Non linear Binary equations using sat solverhttp://ask.sagemath.org/question/36165/non-linear-binary-equations-using-sat-solver/ How can I solve a set of nonlinear binary equations in SAGE using the sat solver?RADEON360Wed, 04 Jan 2017 00:25:06 -0600http://ask.sagemath.org/question/36165/Error with semi-definite program solverhttp://ask.sagemath.org/question/33125/error-with-semi-definite-program-solver/ Hello,
I use sage 7.1 on a debian computer. I am trying to use the sdp solver, but:
p = SemidefiniteProgram()
omega = p.new_variable()
p.set_objective(omega[0])
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.show()
returns an error:
ValueError: need more than 1 value to unpack
What does it mean?
Antoine
**After some tests...**
I don't understand what happens but here are some tests I have done:
The sdp solver works when I put all the variables in the objective. So it works with:
p = SemidefiniteProgram()
omega = p.new_variable()
p.set_objective(omega[0] + 0*omega[1])
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.show()
If I put the objective after the constraints I get the error again. For example with
p = SemidefiniteProgram()
omega = p.new_variable()
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.set_objective(omega[0] + 0*omega[1])
p.show()
I get the error
ValueError: need more than 1 value to unpack
To conclude it means that I need to know all the variables x I will use in my sdp and add 0*x to the objective. It works like that but if someone can explain me the error I would be happy !
AntoineagrospelFri, 15 Apr 2016 16:57:18 -0500http://ask.sagemath.org/question/33125/How to solve polynomial equation systemhttp://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/ Greetings,
I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.
Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc.
How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?
Thank you in advance for any hints and
with best regards
DanDanTue, 09 Feb 2016 02:08:24 -0600http://ask.sagemath.org/question/32506/Solver for multiple variablehttp://ask.sagemath.org/question/26616/solver-for-multiple-variable/I have a function which depends of multiple parameters, and I need to find the parameters that minimize some error function.
Is non linear, but works well with conjugate gradient and central derivative methods on other software, which just do not have the necessary precision.
Is there something similar in PariGP?
The "solver" function seems to work only with one parameter.
Please, do not ask for more specific details about the function. This is a general question.marracoTue, 21 Apr 2015 14:06:22 -0500http://ask.sagemath.org/question/26616/