Skip to main content

Hermax: MaxSAT Optimization for Python

PyPI version PyPI wheel Python versions License: Apache-2.0 Documentation Status
Paper: SAT 2026 Windows supported Linux supported macOS supported

Hermax Banner

Hermax is a Python bridge to high-performance MaxSAT backends, with a unified IPAMIR-inspired interface for hard clauses, soft literals, assumptions, and iterative optimization workflows.

Why Hermax

  • High-level modeling API (hermax.model) with typed variables, vectors, matrices, intervals, and lazy arithmetic.
  • Unified API across heterogeneous MaxSAT engines.
  • Incremental and non-incremental solver families
  • Scientific and reproducible workflow
  • Native compatibility with PySAT

Who Is This For?

Hermax is for combinatorially hard problems where:

  • finding even a good base solution is already difficult
  • the search state is mostly boolean

This is usually a better fit than MILP tooling when your problem is not mainly about floating-point structure, large integer arithmetic, or strong LP relaxations. In those cases, a MILP such as PuLP, SCIP, or Gurobi is often the more natural first choice.

If your problem is highly combinatorial but can benefit from a broader black-box CP approach, CP-SAT may also be a good alternative.

Hermax is especially relevant for:

  • engineers building repeated optimization workflows around hard clauses, soft literals, assumptions, and iterative solve loops,
  • users who already work with clauses, WCNF, or incremental solver-style APIs, and
  • researchers comparing MaxSAT backends behind a common Python interface.

Installation

Core install:

pip install hermax

Modeling Example

from hermax.model import Model

m = Model()

# Decision variables
x = m.int_vector("x", length=4, lb=0, ub=6)       # integer domain [0, 6]
use_bonus = m.bool("use_bonus")

# Hard constraints
m &= x.all_different()
m &= (x[0] + x[1] <= x[2] + 2)
m &= (x[3] >= 2).only_if(use_bonus)

# Soft objective terms
m.obj[5] += (x[0] == 1)
m.obj[3] += ~use_bonus

r = m.solve()  # auto-routes SAT/MaxSAT based on model content
print(r.status, r.cost)

Incremental MaxSAT Example

from hermax.incremental import UWrMaxSAT

solver = UWrMaxSAT()
solver.add_clause([1, 2])   # hard
solver.set_soft(-1, 10)     # soft weight
solver.set_soft(-1, 6)      # update weight (last-wins)

ok = solver.solve(assumptions=[-2])
print("status:", solver.get_status().name)
if ok:
    print("cost:", solver.get_cost())
    print("model:", solver.get_model())

Citation

If you use Hermax in research, please cite:

@InProceedings{salviahornos_et_al:LIPIcs.SAT.2026.41,
  author = {Salvia Hornos, Josep Maria and Fern\'{a}ndez Cam\'{o}n, C\`{e}sar and Mateu Pi\~{n}ol, Carles},
  title = {{Hermax: A Unified MaxSAT Library}},
  booktitle = {29th International Conference on Theory and Applications of Satisfiability Testing (SAT 2026)},
  pages = {41:1--41:13},
  series = {Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN = {978-3-95977-431-4},
  ISSN = {1868-8969},
  year = {2026},
  volume = {377},
  editor = {Ignatiev, Alexey and Szeider, Stefan},
  publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f\"{u}r Informatik},
  address = {Dagstuhl, Germany},
  URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SAT.2026.41},
  URN = {urn:nbn:de:0030-drops-263478},
  doi = {10.4230/LIPIcs.SAT.2026.41},
  annote = {Keywords: MaxSAT, Incremental Solving, IPAMIR, Python, Constraint modelling}
}

Please also cite the backend solver papers relevant to your experiments; see the documentation acknowledgments, CITATION.cff, and NOTICE for the relevant references.

License

This repository is licensed under Apache License 2.0. See LICENSE. Third-party integrated solvers may have additional license terms.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hermax-1.2.4-cp314-cp314-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.14Windows x86-64

hermax-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

hermax-1.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp314-cp314-macosx_14_0_arm64.whl (5.6 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

hermax-1.2.4-cp313-cp313-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.13Windows x86-64

hermax-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

hermax-1.2.4-cp313-cp313-macosx_14_0_arm64.whl (5.6 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

hermax-1.2.4-cp312-cp312-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.12Windows x86-64

hermax-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

hermax-1.2.4-cp312-cp312-macosx_14_0_arm64.whl (5.6 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

hermax-1.2.4-cp311-cp311-win_amd64.whl (11.8 MB view details)

Uploaded CPython 3.11Windows x86-64

hermax-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

hermax-1.2.4-cp311-cp311-macosx_14_0_arm64.whl (5.6 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

hermax-1.2.4-cp310-cp310-win_amd64.whl (11.7 MB view details)

Uploaded CPython 3.10Windows x86-64

hermax-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hermax-1.2.4-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

hermax-1.2.4-cp310-cp310-macosx_14_0_arm64.whl (5.6 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file hermax-1.2.4-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: hermax-1.2.4-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermax-1.2.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 1e6efedb550bdfd3a13fa98d73a18405f4ac20a5a129b103695dac11c6823603
MD5 ef585d1e3c84abfb6e05423a5e8251d0
BLAKE2b-256 ff67660075df90ff3e3279956721eef5c23af3532fa0352f02fa3128c2c50c75

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f1e6823780d6adc3417bbfd5daad00ea370c05d13a4496b607cf0674dba6e0d8
MD5 75983bc917b867e153b069f825d6a6a1
BLAKE2b-256 a05894160167ea6596501f5ec78a6acdafc26c9568b6a4050b427ad937076be7

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 076f88a78a649fb0413339f9a803684be9370b4461fe30cd142c31b2232a6352
MD5 23547d8564286778012996f0ec332593
BLAKE2b-256 4004814cd9a64b4f04cb37a358eebe3b3340c5b403c19d2e8d268230354028e4

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b3370171b59207c4bf210e8a246727cb90fcb0f7b4fac06c06cac4a4a4b9501a
MD5 bcadf91ca50343bf9d83b3d394a8e18e
BLAKE2b-256 612eda16f79c4a47f3ee24f1dbb1a01dcd1b9a2ca09ed6de0534b30c311a8838

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d8a32135a54cb3c594f9eceb289d6315676b9aeabfce91109004c7e9134e5098
MD5 2c8514fc3a624772457e0f0e0ef3b5f0
BLAKE2b-256 d43cfb4daab17e431eca89697e256f8d16574eaec3927d9003d093ad5807406e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermax-1.2.4-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: cibuildwheel.yml on josalhor/hermax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermax-1.2.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: hermax-1.2.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermax-1.2.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0a2d34b6e387afb9de9b981a8fe19c9f89ff84e9d29360e22f7be8c7aff38b59
MD5 afdfe892511dd758cab4d23215bc6379
BLAKE2b-256 a9ac34f791e30dbd4868162c208123c935e4377db41de0b767f832c2a05225fc

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 75dbfa82dac3f9ac1be28c4a07acabae5c5d0483a0bf4e1b7a7063988dcdf166
MD5 185d0ecdaf9c9330b9a9d03ca3db0ba2
BLAKE2b-256 afef6488456c749f8be471cc9eabbdee134b5f37d1dad832aa8b648b193040c3

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 38c96830f67f832626cfb19298cd4db14cfb8972cb2e1887e14166b75bfacb63
MD5 e2c10bb4ea6080416e85514cd43f4690
BLAKE2b-256 542fc761562966a7a08c8f0a03784d41ffde270cc681cbaa174592f51cb25bd2

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c0f994ef7d224d75ea439d8f6fbed8d0a109827c0f3dbf3465f49160408c3ebe
MD5 431d20aa28b9b53528940e2c0c53da39
BLAKE2b-256 5aaea8366e6223c14ac88c03d45ccbc59cf9f29eeba7a345434dde21d855198f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermax-1.2.4-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: cibuildwheel.yml on josalhor/hermax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermax-1.2.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: hermax-1.2.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermax-1.2.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c6756bc176f40aa544009343b083532562831e3c56adf16bae39ea705ef5ee0e
MD5 e343450a0ca5154656885861b3efc04d
BLAKE2b-256 8c4965b43df8be8e74bbaa97e2e65b6ed4597f68052711ab28c47e1d71a484d8

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9c015f5cf632ddb31f6a185aa2e3300ac0053840f19b0c4cf1486a05483f0d19
MD5 8b6b9fc04dc475cf17466fb1439a970f
BLAKE2b-256 465b19e877de99b3978d297712b3826dccf2dd4a6599cda5ace1032d09057497

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dba713290c4a0b837255b74bd53540dd839ed0faaa6f2726e7dc2611fb796073
MD5 9b89c0ab187b66ae4f3d2ea423cc9a29
BLAKE2b-256 7fe4f04faaab270e717db27b2d0d47354de269abbbbc116bfef50efae3d70f7e

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4a26c0bd77ebd48d121e13c28fa81848a108e0c9e24f5dc81968ca7752e29c4e
MD5 9d2af55609abdea6c595c2892e04ee72
BLAKE2b-256 d887b17c54d528361e187ea85783e2ca29cae225e3253de3c342366c9963a34f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermax-1.2.4-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: cibuildwheel.yml on josalhor/hermax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermax-1.2.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: hermax-1.2.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermax-1.2.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ee18db2d5c3737b8af9ea1ce357a626c1bde9aff497b70898c35cafc9b7c4d5f
MD5 0dbd9c6a7f310ae0d61dd56730642b06
BLAKE2b-256 e74ec7e6af51dedac03c4f40e7492d9994aafae524b13e655ccde497dc557b46

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 392d0bf89bdff467ea4fbe56fd8c89270441584a7720e5097f9867f95c9c7637
MD5 5dac24a5f34120894c786e47aea4bdd1
BLAKE2b-256 8fe476ccb7357f59b666204844cb94177beb51b4fd5460643333469b4abeb2b6

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7c96a74043c11c213931e4239d6e3f52f0eece816b37d777c55a63bb6a09b079
MD5 ebdba5a17a5a9da62774780b77c6d8cf
BLAKE2b-256 f19dd6040b362a71fab69c5590cb98002e65c8f8dc4b227102148934812bd861

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bbbfc99cd830d3a2e7f66d556062a604aa0c9af0214dc874023cd8af6058880c
MD5 34dc27f4890ce0b3b4aa6d26727ec68d
BLAKE2b-256 8c3d335da3f9172c2edc0e8f4b51b3f3eec6a5ae264a203c41b24ebe3cff96c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermax-1.2.4-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: cibuildwheel.yml on josalhor/hermax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermax-1.2.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: hermax-1.2.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 11.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for hermax-1.2.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b4952b2b2e54b3e87099da922496ac94ab3856276bf7fd7f7e600520b0395958
MD5 0ae939319ac0aa5ca26c1e6cf09e5ea0
BLAKE2b-256 b84219cf6904197f6f1e8715483bba6003cbbb78575702578dbb6d995a95475e

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 83c8e6c6d956ec05756064cc0315a97de565f38bb35d7465344e269117ba6d14
MD5 129cdb19bca7e7e323ee818ea0265870
BLAKE2b-256 59aaa93335a7425c440da391ae934e73a6f0e250eb212cdc0eb27955da2d7aaa

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c8156d4a649910d27643d33fceb550a58cccf852bb2b6e0bc6fe2f3ac01bc154
MD5 9928f3889f9d113fc38421b4ca20155a
BLAKE2b-256 474c0e1c216007b16e3b6b18b0e0ad909c8ece89c3d84fb3db108062b5311996

See more details on using hashes here.

File details

Details for the file hermax-1.2.4-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hermax-1.2.4-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 aeebabea1f09a06ad04fb7be8bbaf3ce556fc6d7535ab064b90913bf4b576fa4
MD5 52856cacf31dc7a94ecf330f6f053091
BLAKE2b-256 73d26b0e0670987c1e6d6a50bac7d6bc1fe12342df9ed4e27bbaba0a1ee283f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermax-1.2.4-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: cibuildwheel.yml on josalhor/hermax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.2.5

10 files

This release

1.2.4 This release

21 files

1.2.3

5 files

1.2.1

25 files

1.1.1

25 files

1.0.0

20 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page