Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168728
Image: ubuntu2004
RealNumber=float Integer=int from cvxopt.base import matrix from cvxopt import solvers
c=matrix([0.71,0.5,0.15]) A=matrix([[-35.0,-60,-30,-1,0,0],[-0.5,-300,-20,0,-1,0],[-0.5,-10,-10,0,0,-1]]) b=matrix([-0.5,-15,-4,0,0,0]) sol=solvers.lp(-c,A,b) print sol['x']
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_8.py", line 9, in <module> exec compile(ur'open("___code___.py","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("Yz1tYXRyaXgoWzAuNzEsMC41LDAuMTVdKQpBPW1hdHJpeChbWy0zNS4wLC02MCwtMzAsLTEsMCwwXSxbLTAuNSwtMzAwLC0yMCwwLC0xLDBdLFstMC41LC0xMCwtMTAsMCwwLC0xXV0pCmI9bWF0cml4KFstMC41LC0xNSwtNCwwLDAsMF0pCnNvbD1zb2x2ZXJzLmxwKC1jLEEsYikKcHJpbnQgc29sWyd4J10="),globals())+"\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpyazWiI/___code___.py", line 6, in <module> sol=solvers.lp(-c,A,b) NameError: name 'solvers' is not defined