All Projects → isse-augsburg → minibrass

isse-augsburg / minibrass

Licence: MIT license
Modeling preferences and soft constraints -- qualitatively and quantitatively on top of MiniZinc

Programming Languages

Jupyter Notebook
11667 projects
java
68154 projects - #9 most used programming language
HTML
75241 projects
CSS
56736 projects
scala
5932 projects
shell
77523 projects

Projects that are alternatives of or similar to minibrass

Formidable
The PHP pragmatic forms library
Stars: ✭ 116 (+792.31%)
Mutual labels:  constraints
VanillaConstraints
🍦 Simplified and chainable AutoLayout constraints for iOS.
Stars: ✭ 42 (+223.08%)
Mutual labels:  constraints
GHOST
General meta-Heuristic Optimization Solving Toolkit
Stars: ✭ 28 (+115.38%)
Mutual labels:  constraints
vote.dart
Code to simulate, run, and calculate elections with different election methods
Stars: ✭ 25 (+92.31%)
Mutual labels:  voting
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+438.46%)
Mutual labels:  voting
proof-of-vote
Votem's Proof of Vote® protocol whitepaper
Stars: ✭ 20 (+53.85%)
Mutual labels:  voting
pymzn
A Python wrapper for the MiniZinc tool pipeline.
Stars: ✭ 54 (+315.38%)
Mutual labels:  minizinc
csb
A cloth and soft body simulation library, using position based dynamics.
Stars: ✭ 29 (+123.08%)
Mutual labels:  constraints
MsalsasVotingBundle
Provides voting/rating management for your Symfony project.
Stars: ✭ 14 (+7.69%)
Mutual labels:  voting
votacidade-app
Calculadora de afinidade para o Vota Cidade 2020
Stars: ✭ 12 (-7.69%)
Mutual labels:  voting
SuperPuperDuperLayout
Super puper duper mega easy awesome wrapper over auto layout!!111!!1!!!1!!!11111!!!1!!
Stars: ✭ 14 (+7.69%)
Mutual labels:  constraints
proof-of-hodl
provable bitcoin HODLing
Stars: ✭ 21 (+61.54%)
Mutual labels:  voting
Flask-Validator
Validator for SQLAlchemy Models
Stars: ✭ 27 (+107.69%)
Mutual labels:  constraints
django-db-constraints
Add database table-level constraints to your Django model's Meta
Stars: ✭ 43 (+230.77%)
Mutual labels:  constraints
clpsmt-miniKanren
CLP(SMT) on top of miniKanren
Stars: ✭ 31 (+138.46%)
Mutual labels:  constraints
minizinc-python
Access to all MiniZinc functionality directly from Python
Stars: ✭ 92 (+607.69%)
Mutual labels:  minizinc
Driftwood
Driftwood is a DSL to make Auto Layout easy on iOS, tvOS and macOS.
Stars: ✭ 14 (+7.69%)
Mutual labels:  constraints
cassowary.lua
A Lua port of the cassowary constraint solver engine
Stars: ✭ 34 (+161.54%)
Mutual labels:  constraints
Votum
A Discord bot for managing small party voting systems
Stars: ✭ 20 (+53.85%)
Mutual labels:  voting
ultimate-poll-bot
💡 The ultimate vote and poll bot for creating, sharing and evaluating polls inside of Telegram
Stars: ✭ 109 (+738.46%)
Mutual labels:  voting

MiniBrass Logo -- Specifying goals the declarative way

MiniBrass is a language and library that adds support for soft constraints to MiniZinc/MiniSearch to model weak/soft constraints, wishes and preferences systematically. MiniBrass pays tribute to the tradition of naming NICTA's G12 software after elements in the 12th group of the periodic table. Brass is firstly an alloy that contains zinc and, according to the German Wikipedia,

Cold forming is possible with brass alloys containing up to 37% zinc. At higher zinc rates, only warm forming at temperatures > 600 °C is possible.

More specifically, we aim to provide

  • Convenient expression of various types of soft constraint problems
  • Automatic translation to weighted CSP
  • Generic search heuristics
  • Consistency checks of the specified relationships
  • Integration of soft global constraints

To see a "Hello, World"-example, consider the following hard constraint model in MiniZinc

% the basic, "classic" CSP 
set of int: NURSES = 1..3;
int: day = 1; int: night = 2; int:off = 3;
set of int: SHIFTS = {day,night,off};

array[NURSES] of var SHIFTS: n;

% additional hard constraints would be here 

solve 
:: pvsSearchHeuristic
satisfy;

output ["n = \(n)"] ++ 
       [ "\nValuations:  topLevelObjective = \(topLevelObjective)\n"];

that is accompanied by the following MiniBrass model

type ConstraintPreferences = PVSType<bool, set of 1..nScs> = 
  params { 
    array[int, 1..2] of 1..nScs: crEdges;
    bool: useSPD;
  } in 
  instantiates with "soft_constraints/mbr_types/cr_type.mzn" {
    times -> union_violateds;
    is_worse -> is_worse_constraint_pref;
    top -> {};
};
    

PVS: cr1 = new ConstraintPreferences("cr1") {
   soft-constraint c1: 'sum(i in NURSES)(bool2int(n[i] = night)) = 2';
   soft-constraint c2: 'n[2] in {day,off}';
   soft-constraint c3: 'n[3] = off';
   
   crEdges : '[| mbr.c2, mbr.c1 | mbr.c3, mbr.c1 |]';
   useSPD: 'true' ;
}; 

solve cr1;

Execute this pair using

minibrass nurseHelloWorld.mbr nurseHelloWorld.mzn

as shown in https://github.com/isse-augsburg/minibrass/tree/master/example-problems/nurse-example

For a user-centered perspective, please refer to our main page.

Dev Setup

MiniBrass is mirrored on gitlab to access their CI/CD features. To setup your local repository appropriately, please consult the wiki setup page.

Tech

MiniBrass is based on these open source projects:

  • MiniZinc - Of course, its underlying modeling language!
  • MiniSearch - an extension of MiniZinc to support more flexible search strategies

Project overview

  • source-code/java provides the MiniBrass compiler to model using partial valuation structures (PVS)
  • source-code/minizinc contains the MiniBrass library containing predicates and functions in MiniZinc
  • source-code/kiv contains PVS-related proofs in the KIV theorem prover
  • example-problems shows problems referred to in the documentation

Test cases

To be able to run the test cases from Eclipse, make sure to start it in interactive mode (or link the solvers/minizinc binaries in /usr/bin or some other binaries directory)

bash -ic ./eclipse
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].