msakai / pseudo-boolean Goto Github PK
View Code? Open in Web Editor NEWHaskell library for parsing/generating OPB/WBO files used in pseudo boolean competition.
License: BSD 3-Clause "New" or "Revised" License
Haskell library for parsing/generating OPB/WBO files used in pseudo boolean competition.
License: BSD 3-Clause "New" or "Revised" License
The error in msakai/toysolver#15 is caused by missing white spaces at the end of weighted terms.
I think the current grammar based too strict, and it's reasonable to relax to accept those files.
It is possible to generate OPB files that contain empty <sum>
.
> putStr $ toOPBString $ Formula{ pbObjectiveFunction = Just [], pbConstraints = [], pbNumVars = 0, pbNumConstraints = 0 }
* #variable= 0 #constraint= 0
min: ;
> putStr $ toOPBString $ Formula{ pbObjectiveFunction = Nothing, pbConstraints = [([], Ge, 0)], pbNumVars = 0, pbNumConstraints = 1 }
* #variable= 0 #constraint= 1
>= 0;
But empty <sum>
is not allowed in the grammar:
<sum>::= <weightedterm> | <weightedterm> <sum>
and our parser based on this grammar rejects it.
This causes parsing errors.
e.g. msakai/toysolver#60 (comment)
Citing from http://hydra.cryp.to/build/887541/log/raw:
Running 1 test suites...
Test suite TestPBFile: RUNNING...
Main
readUnsignedInteger: OK
+++ OK, passed 100 tests.
exampleLIN: OK
exampleNLC1: OK
exampleNLC2: OK
exampleWBO1: OK
exampleWBO2: OK
exampleWBO3: OK
exampleLIN file: OK
exampleNLC1 file: OK
exampleNLC2 file: OK
exampleWBO1 file: OK
exampleWBO2 file: OK
exampleWBO3 file: OK
exampleLIN PBS file: OK
exampleLIN nohint file: OK
exampleWBO1 nohint file: OK
exampleWBO1 notop file: OK
normalized 1096 cudf paranoid: FAIL
Exception: test/samples/normalized-1096.cudf.paranoid.opb: openBinaryFile: does not exist (No such file or directory)
normalized mds 50 10 4: OK
normalized opt market split 4 30 2: OK
pigeonhole 5 4: OK
readUnsignedInteger maxBound bug: OK
1 out of 22 tests failed (0.02s)
Test suite TestPBFile: FAIL
It appears that file is missing from the release archive.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.