home.social

#minizinc — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #minizinc, aggregated by home.social.

fetched live
  1. Ich habe ausprobiert, wie man eine typische Knobelaufgabe mit logischer Programmierung lösen kann: sebstein.hpfsc.de/2025/12/31/l

    #MiniZinc

  2. [Перевод] Решение головоломки NYTimes Pips с помощью решателя ограничений

    Кажется, что головоломка NYT Pips — это просто игра с домино и цветными клетками. Но если взглянуть на неё как на задачу удовлетворения ограничений, она превращается в удобный полигон для современных решателей вроде MiniZinc. В статье автор показывает, как описать Pips не в виде алгоритма перебора, а в виде системы ограничений: сетка, домино, суммы по областям, симметрии и «мусорные» решения. По ходу дела выясняется, что войти в мир constraint solving можно буквально за пару часов, а заодно на практике понять, почему эти инструменты умеют разруливать экспоненциальный хаос вариантов за миллисекунды — но иногда внезапно «залипают» на одной и той же головоломке. Читать разбор

    habr.com/ru/companies/otus/art

    #решатели_ограничений #MiniZinc #моделирование_ограничений #поиск_решений #бэктрекинг #оптимизация_перебора #головоломки #алгоритмическое_моделирование

  3. [Перевод] Многие сложные задачи на LeetCode — это простые задачи на ограничения

    Иногда впечатление от алгоритмических задач такое, будто вас просят не решать проблему, а угадать «правильный» трюк из головы автора. В этой статье мы посмотрим на те же самые leetcode-подобные задачи глазами человека, который устал изобретать стеки и динамику на собеседовании и попробовал формулировать их как задачу оптимизации для солвера ограничений. Разбираем, как привычные «найди максимум при таких-то условиях» превращаются в компактные декларативные модели, зачем вообще нужны такие упражнения, что они говорят о собеседованиях и о нашем отношении к алгоритмам — и где у подхода с MiniZinc/constraint solving проходят естественные границы. Смотреть подход

    habr.com/ru/companies/otus/art

    #задачи #leetcode #алгоритмы #задачи_на_ограничения #временная_сложность #MiniZinc #солвер_ограничений #оптимизация_задач #собеседование_разработчика #алгоритмические_задачи

  4. 🚀 Wow, what a thrill! An article about squeezing workforce schedules into #MiniZinc. Because nothing screams excitement like cactus plots and footnotes on night shifts! 🌵🌙
    zayenz.se/blog/post/rotating-w #CactusPlots #WorkforceScheduling #NightShifts #ExcitingData #HackerNews #ngated

  5. @joshg Took a few minutes to type in, but it’s not egregious, the logic is straightforward and can be solved by hand easily. But it’s more instructive this way:

    include "alldifferent.mzn";

    % Two lists of ints between 1 and 5, both inclusive
    % One we'll use for the indices of the matrix cell coordinates, and the other for cell values.
    set of int: COORD = 1..5;
    set of int: VALUE = 1..5;

    % Define a matrix, which is a 2-dimensional array with indices for its cells
    % defined by COORD, so between 1 and 5, where each matrix cell
    % takes any value of those defined in the list VALUE:
    array[COORD,COORD] of var VALUE: v;

    % All different in rows: the 'j' coordinate advances in the column
    constraint forall(i,j in v)(
    alldifferent([v[i,j] | j in VALUE]));

    % All different in columns: the 'i' coordinate advances in the row
    constraint forall(i,j in v)(
    alldifferent([v[i,j] | i in VALUE]));

    % All the groups of cells that add up to 10,
    % using either sums (+ sign) or multiplications (* sign)
    constraint v[1,1] + v[1,2] + v[1,3] + v[1,4] = 10;
    constraint v[1,5] + v[2,5] + v[3,5] = 10;
    constraint v[2,1] + v[2,2] + v[3,1] = 10;
    constraint v[2,3] * v[2,4] * v[3,4] = 10;
    constraint v[3,2] + v[3,3] + v[4,2] = 10;
    constraint v[4,1] + v[5,1] + v[5,2] = 10;
    constraint v[4,3] + v[5,3] + v[5,4] + v[5,5] = 10;
    constraint v[4,4] * v[4,5] = 10;

    solve satisfy;

    #CSP #minizinc

  6. 📣 MiniZinc 2.8.6 is here! 🎉

    This release includes various bug fixes and improvements. See the full changelog here: docs.minizinc.dev/en/2.8.6/cha

    Upgrade now and start modelling! 🚀

    #MiniZinc #ConstraintModelling #Optimization #ORMS

  7. The full MiniZinc challenge results are now available on the website: minizinc.org/challenge/2024/re

    Thank you to all the dedicated solver creators that competed in the competition!

    #MiniZinc #ConstraintModelling #Optimization

  8. I’m excited to share that the core MiniZinc team is one of the finalists for the 2024 Eureka Prize for Excellence in Research Software. It’s an honour to be shortlisted for such a prestigious award.

    youtu.be/a4IMa5MjAGo?si=52NzR4

    #MiniZinc #ConstraintModelling #EurekaPrizes

  9. Congrats to the finalists for the Eureka Prize for Excellence in Research Software, developing and maintaining , MRtrix3 and

    This prize recognises and celebrates those who develop and maintain software in Australia that underpins research and scientific discovery.
    ardc.edu.au/article/finalists-

  10. Has anyone noticed yet that the MiniZinc documentation has moved to @readthedocs ?

    It is now easier than ever to navigate between different versions of the documentation. docs.minizinc.dev/

    #MiniZinc #documentation

  11. I really like the small optimizations I merged into MiniZinc. When you use the `in` or inequality operators on records or tuples, then the compiler will automatically try and create `table` or `lex_less(eq)` constraints. 🙌

    #MiniZinc #SmallWins

  12. Another MiniZinc patch release is now available. The MiniZinc package now includes the latest OR-Tools solver, and the compiler now includes fixes for many small issues to get ready for the next MiniZinc challenge. Have a look at the change log for more details.

    minizinc.org/doc-2.8.5/en/chan

    #MiniZinc #ConstraintModelling #Optimization #ORMS

  13. We just started a LinkedIn group for MiniZinc practitioners and enthusiasts: linkedin.com/groups/14443233/

    (I understand that this might not be everyone's cup of tea, and I will try and keep people up-to-date here as well)

    #MiniZinc #Optimization #LinkedIn

  14. Today we launch the new MiniZinc website! At the same time Monash University has released a new promotional video for our project. Feel free to use and share this video to let other people know about MiniZinc.

    youtu.be/Zp32x3mUJRU?si=ZP4OEs

    #MiniZinc #promo

  15. A new release of the FlatZinc serde Rust crate: crates.io/crates/flatzinc-serd

    It now has support for printing the FlatZinc structures in the traditional `.fzn` format, and using your own `FromStr + Display` type for the Identifiers when (de)serializing.

    #Rust #MiniZinc #FlatZinc

  16. With the addition of FlatZinc JSON, connecting your solver to the MiniZinc is easier than ever before.

    If you are writing a combinatorial solver in Rust, then have a look at this crate I've just published: docs.rs/flatzinc-serde/0.1.0/f It contains a Serde definition that makes deserializing FlatZinc JSON a breeze.

    #MiniZinc #Serde #Rust

  17. I really enjoyed this talk by @robpike reflecting on #Go: youtube.com/watch?v=yE5Tpp2BSG
    Creating a programming language that is practical for its community is hard work. Hearing someone with so much experience talking about the process and the lessons learned is really wonderful.

    Hopefully I can incorporate some of these lessons into #MiniZinc

  18. #MiniZinc already works with #Gurobi 11, the newly released version. It might not, however, find it automatically. On the command line you can add the `--gurobi-dll` flag to signal where the library is located. You can also add this flag to your MiniZinc preferences so this happens automatically.

  19. A great unknown #MiniZinc feature, is the `trace_exp` function. It automatically gives a useful tracing message every time the compiler processes the function argument, showing the result.

    Playground: t.ly/beb1K

  20. I was scratching my head today about how to construct array literals `[1,2,3,…,n]` in #MiniZinc today. I was afraid that it would require some a bad recursive function, but it actually turns out to be quite easy once you remember the right builtin: `set2array(1..n)`