Git Product home page Git Product logo

puddle's Introduction

Puddle

Build Status

Puddle is a system for high-level, reliable programming of microfluidic devices. Check out the project page on the MISL website.

Installation

We use Git LFS to store larger files. If you want to see those larger files (videos, presentations, etc.) make sure to install it. Once you have it installed, you can use Git as you usually would.

Run the Makefile to build and test stuff.

The core is written in Rust. Go in there to see how to build it.

Running Examples

The frontends all have their own examples. Checkout the Python frontend.

Contributing

Check out the Code of Conduct and the Contributing Guidelines.

puddle's People

Contributors

mwillsey avatar michalpiszczek avatar chrstnb avatar sarangjo avatar calebwin avatar luisceze avatar

Stargazers

Ken Keiter avatar Jack Armitage avatar David Stump avatar  avatar guguaGGGGG avatar Evan Wieland avatar Jeff Carpenter avatar Sophie  avatar  avatar Mingkai Dong avatar  avatar Lucas Zeer avatar Daniel Baker avatar Lin avatar Eunice Jun avatar Nicholas Roberts avatar sheng avatar dreamer avatar  avatar  avatar shua avatar Seder(方进) avatar  avatar  avatar Chris Tomkins-Tinch avatar Zeyuan Hu avatar Tianqi Chen avatar  avatar Akhil Acharya avatar Satyam Tiwary avatar Andrew Hu avatar  avatar  avatar  avatar  avatar  avatar

Watchers

Jared Roesch avatar James Cloos avatar  avatar Pranav Vaid avatar  avatar  avatar  avatar Andrew Hu avatar Vigneshwar Rajesh avatar

puddle's Issues

Parallel process threads only create one drop

In the process isolation tests, although multiple processes are able to be created, only one of them actually adds a droplet to the chip when run in parallel. Failing test can be seen in PR #24

Collisions should mix

Collisions between droplets of the same collision group should actually perform a mix. This will likely require a reroute.

Graph isomorphism bends splits

The placer uses graph isomorphism to place commands right now. This nicely handles rotations and symmetries but will "bend" graphs without enough structure.

Example:
The Split command uses a path graph as its shape. This is intended to be a straight line, but isomorphism will happily bend it. I think simple.py actually exhibits this behavior.

We could first try a very simple placer that just tries to stamp out a module and every possible location. It would be nice, however, to still handle rotations and symmetries. That also might entail a more global transition from graph to grid data structures for boards and commands.

Collision group logic is very messy

Collision group logic is very messy, needlessly complicating all sorts of things.

It introduces unnecessary mutability:

// FIXME this shouldn't be mut, but we need to set the collision groups in mix
fn dynamic_info(&self, &mut GridView) -> DynamicCommandInfo;

It also just makes the routing waaaay more complicated (and probably) buggy. We could fix this by having some cleaner (non-mutating) way of asking the router to allow things to collide. This would also be cleaner because we will actually know when the mix occurs, allowing us to update the droplet.

Add Error Simulation to the Core

Currently, running error experiments on the frontends exhibits weird behavior because the core only supports perfect (volume/2) splits.

It should be possible to specify the error profile of an entire session (or perhaps individual split calls) in the frontends, and have the Core exhibit that behavior.

Example: I want the split error factor to be drawn from N(1, 0.01). When I go to split a 1 volume droplet, and draw 1.2 as the error factor, both the frontend and backend should now see a droplet with volume=0.6 and a droplet with volume=0.4 (see https://github.com/michalpiszczek/puddle/blob/error/src/python/examples/error_dilution.py for the frontend behavior).

Notes:

  • One quick way to do this is having expected volumes be a parameter on split calls, and the Core will simply assume those passed values are correct and assign them to the resulting droplets.
  • Gaussian error should be sufficient.
  • Perhaps we should simulate error for input() as well.

Error detection

We need to add error detection.

I think that error detection will look something like a "diff" function between the Executor's state and the sensor data from the real worlds. The real world data will be anonymous blobs, meaning that it won't be associated with droplet ids. So the comparison should involve some kind of matching function between the real data and the expected data.

For now, I don't expect that we'll be able to generate a matching for "catastrophic" error cases, things like accidental mixes and splits.

TODO:

  • Create test cases for matching
    • identical droplets and blobs should produce an error-free matching
    • close but correctable should generate a matching that we could use for error correction
    • catastrophically wrong (mixes and splits) dont need to work for now
  • Implement and individually test a scoring function between droplets and blobs
  • Implement the matching function so that it passes the test cases

Lazy commands and droplet properties

Right now, move is a strict command that forces a flush. I've written a xfail test for that, as I'm not totally sure that's the right behavior.

One reason that makes sense is that the a droplet's location is going to change only when it's actually moved. That makes movement hard to defer. They tricky part is here is all commands involve movement! So I think we have a couple options:

  1. "invalidate" those properties like location when the user shouldn't be looking at them
  2. only expose DropletShims to the users, that way we never have to worry about them poking around.

I think I'm leaning towards 2.

Also, looking into this raised another validation question. Droplets cannot be used more than once, this is tracked by the valid flag. Right now, we don't check this in many places (I'll fix that myself on master here #10). So just leave this for now and I'll fix after this is merged.

Droplets move unnecessarily

In the python simple.py example, some droplets move when it's not necessary. They could instead just stay stationary.

Visualizer doesn't work with volume or shape.

Right now (as of d74a3ca), the visualizer doesn't work at all. It should:

  • be fixed to at least show something
  • support volume
  • have rudimentary support for shape

We can mostly ignore shape in the visualizer because large droplets never get made, but the support should be there.

Routing will intersect other droplets

Right now, routing is "dumb" and will intersect other droplets.

However, making it just avoid all droplets is also not great, because that's unnecessary for mixing (the mix could occur "on the way" to the mix location). This same intelligence is missing for placement too.

Error Correction

Once we have error detection (#32), we need to start actually correcting them.

Mix should combine in a smarter way

There are several flaws with how mix plans the combination of droplets.

mix_dimensions_too_large_to_combine tests that it doesn't combine droplets in
an obvious "wrong" direction, leading to shapes that don't fit on the board
(23796a4).

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.