Skip to main content

A Python interface to the Schlandals solver

Project description

Installation

pyschlandals is not yet installable from pip. But by cloning the main repository of Schlandals, you can install it in your current python environment. To do so you need to install the Rust toolchain. Once this is done, you should have cargo install. You can then install Maturin with cargo install maturin. Then, from the source directory of pyschlandals, run maturin develop.

Usage

The search and compiler main function are exported in python and can be used directly with the input filename and branching heuristic as follows

from pyschlandals.search import exact
from pyschlandals.compiler import compile
from pyschlandals import BranchingHeuristic

filename = '../tests/instances/bayesian_networks/asia_xray_false.cnf'
print(exact(filename, BranchingHeuristic.MinInDegree))

dac = compile(filename, BranchingHeuristic.MinInDegree)
print(dac.get_circuit_probability())

Documentation for how to access and update circuits parameters will come soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyschlandals-0.0.1.tar.gz (68.8 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page