bokner

bokner

Constraint programming with MiniZinc and Phoenix/LiveView

Hello everyone,

For the last few months, I’ve been working on Solverl, Erlang/Elixir interface to MiniZinc and a supplemental project, SolverView,
which is a web application based on Phoenix/LiveView.

MiniZinc is a generic framework for solving optimization problems typical for Operations Research.
IBM CPLEX,
Google OR-Tools and many other popular OR products have an interface to MiniZinc.

So having Elixir interface to MiniZinc opens up a gateway to industrial-strength optimization tools.

But there is more. Currently, MiniZinc team hosts MiniZinc Python project, the idea is to assist
the solving of complex OR problems through incremental solving techniques driven by the Python code .

Spending quite a bit of time with MiniZinc Python, I’m confident that the similar Elixir-based product will be a much better option. This is mainly due to better asynchronicity/concurrency support.

Solverl already matches the most significant features of MiniZinc Python, and some Solverl features are not available in MiniZinc Python.

SolverView was started as a set of examples that visualize the solving process using Phoenix/LiveView.

You can try it by using Docker image:

docker run -p 4000:4000 bokner/solverview

I have several plans for extending it, one is to build Web IDE for MiniZinc,
with pluggable Elixir components for visualization, post-processing of solutions etc.

I’m very new to Phoenix/LiveView, and web design is not my thing yet, so any advice and/or contribution would help tremendously.
In particular, if anyone is willing to help with Web IDE pages, please let me know.

Most Liked

elcritch

elcritch

The readme for solverl seems impressively thorough! I currently don’t have a use for constraint programming, but kinda wish I did. :slight_smile: LiveVue is perfect for this sort of program.

bokner

bokner

Thank you! Normally, I’m not that thorough with documenting. In this case though, I was motivated by minizinc-python docs, and desire to make Elixir counterpart better :slight_smile:

I only came to Constraint Programming recently as part of my math program studies. It’s very addictive, especially if blended with coding.

Last Post!

braindeaf

braindeaf

Wonderful. Despite being a relative veteran I’m finding constraint solving in itself quite mind bending and difficult to explain the process to colleagues given that it’s new to me, so finding a way of focusing in on how to document and solve the problems we’re working on is pretty challenging. Not to mention the multitude of examples in Python which then add their own flavour of unfamiliar (to me) syntax. Thanks for your work on this.

Where Next?

Popular in Discussions Top

jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49084 226
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement