Giter VIP home page Giter VIP logo

safe-eliminations's Introduction

Identifying numerically safe eliminations automatically

The background is discussed in 2. Identifying feasible assignments of

Ordering matrices to bordered lower triangular form with minimal border width.

The code here is derived from:

https://github.com/baharev/sdopt-tearing/blob/master/sympy_tree.py

However, sympy_tree.py is concerned with binary expression trees coming from Modelica and generating output for AMPL. The solvable.py is only concerned with expression trees coming from, and going to SymPy.
The caveats mentioned in the last two paragraphs of 2.2. Identifying numerically troublesome assignments in Ordering matrices to bordered lower triangular form with minimal border width do apply!

Of course, the long-term goal is to merge the code back into sdopt-tearing.

safe-eliminations's People

Contributors

baharev avatar edwhyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

safe-eliminations's Issues

Value errors when checking validity of matrix

The following error is encountered when running

  • rpc_api.fine_dulmage_mendelsohn
  • heap_md.hessenberg
  • bordered.to_bordered_form

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

The errors originate from the following lines:
dm_decomp.py line 148
order_util.py line 104 + 105

Trying to understand the use cases

@EDWhyte There is an important piece that the original sympy_tree.py in sdopt-tearing does but solvable.py doesn't: In sympy_tree.py all the possible safe eliminations are stored in a dictionary (unfortunately as string). I am almost sure that you will need the eliminations too.

Please clarify your use case, and suggest a solution. The simplest is to do it as in sympy_tree.py but store the SymPy expression trees for all possible eliminations that were flagged as safe.

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.