Giter VIP home page Giter VIP logo

convex_symbolic's People

Contributors

jonnyhyman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wuyou33 pbpf

convex_symbolic's Issues

Better C interface

The performance and utility of the C templates can definitely be improved. If you have ideas discuss them here!

Transposing an expression not supported and leads to strange error

In trying to transpose an atoms.smul instance, I ran into a strange error during the deepcopy phase.

File "c:\users\__jonny__\dropbox\compute\convexoptimization\convex_symbolic\cvx_sym\symbolic.py", line 354, in T
    transpose = copy.deepcopy(self)
  File "C:\Python36-64\lib\copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "C:\Python36-64\lib\copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "C:\Python36-64\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "C:\Python36-64\lib\copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "C:\Python36-64\lib\copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "C:\Python36-64\lib\copy.py", line 215, in _deepcopy_list
    append(deepcopy(a, memo))
  File "C:\Python36-64\lib\copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "C:\Python36-64\lib\copy.py", line 274, in _reconstruct
    y = func(*args)
  File "C:\Python36-64\lib\copyreg.py", line 88, in __newobj__
    return cls.__new__(cls, *args)
  File "c:\users\__jonny__\dropbox\compute\convexoptimization\convex_symbolic\cvx_sym\operations\atoms\muls.py", line 39, in __new__
    return sym.Constant(args[0].value * args[1].value)
IndexError: tuple index out of range

It appears in doing the deepcopy, the new method was called on the smul and misinterpreted the args as constants.

For now, transpose only symbols directly. In the future, will need to implement a transpose method for functions.

Index by subscript

Index by subscript not yet supported (ie. must use Symbol[i,j] not Symbol[i][j])

Shapes of 1 dimensional symbols not standard

Creating a symbol or vector gives it a shape of (N,1), instead of what appears to be the standard (1,N). It assists in clarity for matrix multiplication and "mathematical standards" to have the latter format, but the former format appears to be favored by numpy and cvxpy

Deprecate: Factoring out Vectors equal to Aux variables

In smith form, we factor out vectors equal to aux variables (ie. A = <A0, A1, A2> becomes A = sym0 and sym0[0] = A0, sym0[1] = A0, sym0[2] = A2).

We do this because otherwise placing functions within vectors can be missed by the canonicalization process.

By doing this however, we usually introduced masses of totally unnecessary auxiliary variables.

Generator: Scalars have shape

When doing code generation, scalars, whose conventional shape is (1,1), end up being defined as arrays like : scalar[1][1];

Must catch if scalar and not give dimensions in the problem.h file

Matrix stuffing for medium-large problems takes a very long time

For problems with more than about 500 variables (primal + auxiliary), matrix stuffing takes far longer than it should, chiefly due to the "get coefficients" algorithms. We should probably cache all coefficients in the expression tree, and access that cache rather than constantly recomputing every coefficient for every variable every time we run "get coefficients"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.