#lpSolve
Day 10 of #AdventOfCode - part 2.

After struggling with constrOptim(), I broke down and loaded my first pkg this season. lpSolve is *so much* easier, and handles equality and int constraints. It was wild to revisit linear programming after many years.
Code on GH: github.com/ataustin/adv...
#RStats
ah frig, it's constrained optimization isn't it
December 30, 2025 at 7:01 PM
Suspect lm() is enough for most of them, but yeah I used lpSolve.
December 11, 2025 at 3:00 AM
hilariously I actually meant lpsolve. I don't think I knew that R had a built in systems of equations solver. I'm going to play around with that
December 13, 2024 at 6:52 PM
I just completed "Factory" - Day 10 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/10

I used lpSolve (cran.r-project.org/web/packages...) to solve this #RStats #IntegerLinearProgramming
Day 10 - Advent of Code 2025
adventofcode.com
December 24, 2025 at 12:17 AM
crates.io also has another crate that might be of interest, it is called good_lp. It is an interface for a range of different solves, including cbc, highs, lpsolve, microlp, gurobi, cplex, glpk, scip, and clarabel.
March 5, 2025 at 8:48 PM
Actually, the fast easy solution seems to be using the package library(lpSolve) to find how many matrix rows you need to add together to match a goal vector. Another star ticked off.
December 11, 2025 at 2:56 AM
J'ai découvert le R package lpsolve 🤐 avec mon code pas du tt optimisé & en faisant un décalage car les indices débutent à 1 sur R. + qu'un jour & 2 ⭐, je découvre plein de choses, c'est chouette.

I just completed "Factory" - Day 10 - Advent of Code 2025 #AdventOfCode adventofcode.com/2025/day/10
Day 10 - Advent of Code 2025
adventofcode.com
December 28, 2025 at 12:03 PM
¿Cuán viables son las propuestas de Jack Ma para la planificación informatizada? - cibcom
Paul Cockshott - El uso de la optimización lineal para la construcción de planes económicos lo introdujo por primera vez Kantorovich con un algoritmo similar a los desarrollados posteriormente en Occidente por Danzig. En los últimos años los paquetes de optimización lineal se han hecho accesibles en las computadoras de escritorio, un ejemplo es el sistema lpsolve. En este trabajo muestro primeramente cómo el paquete lp-solve puede ser usado para construir planes macroeconómicos a partir de la información en la tabla input/output (IO). Luego examino la complejidad computacional empírica del paquete para tratar este tipo de problemas. Esto mostrará que la complejidad es demasiado grande para permitir que el paquete se aplique a tablas IO altamente desagregadas. Como alternativa a lp-solve explico el algoritmo Armonía y cómo puede extenderse al problema de los planes plurianuales. Se dan mediciones de rendimiento que indican que el algoritmo Armonía tiene una complejidad computacional notablemente menor que lp-solve, lo que lo hace más adecuado para planes altamente desagregados.
cibcom.org
November 7, 2024 at 7:25 PM
CRAN updates: gsheet lpSolve shiny #rstats
December 14, 2024 at 1:02 AM
CRAN updates: lpSolve movieROC #rstats
November 8, 2024 at 11:02 AM
CRAN updates: abind antaresRead archive betareg eodhdR2 esci FeatureExtraction formatters ichimoku intRinsic LocalCop lpSolve pcalg pkgcache pkgdepends ps SSplots #rstats
September 12, 2024 at 6:02 PM
Updates on CRAN: COMMA (1.1.1), gsheet (0.4.6), joyn (0.2.4), loa (0.3.0.1), lpSolve (5.6.23), shiny (1.10.0), surveydown (0.7.2)
December 14, 2024 at 2:24 AM
Updates on CRAN: finnsurveytext (2.1.0), flowchart (0.6.0), knitr (1.49), lpSolve (5.6.22), minty (0.0.4), mlr3filters (0.8.1), model4you (0.9-8), movieROC (0.1.2)
November 8, 2024 at 1:23 PM
Updates on CRAN: intRinsic (1.1.0), LocalCop (0.0.2), lpSolve (5.6.21), maldipickr (1.3.1), naaccr (3.0.1), pcalg (2.7-12), pkgcache (2.2.3), pkgdepends (0.8.0), ps (1.8.0), SSplots (0.1.2), trekcolors (0.2.0), vglmer (1.0.5)
September 12, 2024 at 9:16 PM
有益な記事ありがとうございます。“Code for the Earth Movers Distance (EMD) ”はヘッダファイルを少し手直しすることでMSYSのgccでコンパイルできました。 / htn.to/3iP26PVFpi
Earth Mover's Distance(2)lpSolveを使ったC実装 - "Truth of the Legend" Notes
Earth Mover's Distance (2)EMD with lpSolve 2021/03/11 藤田昭人 だいぶん間が空いてしまいましたが… 実は Earth Mover's Distance の実装を巡って悪戦苦闘してました。 その顛末をダラダラを書き連ねた記事が予想外に長くなってしまったので、 要点のみをピックアップして再構成したものが本稿です。 今日 Earth Mover's ...
htn.to
November 30, 2024 at 5:34 AM
libqxp, libstaroffice, libtommath, libwps, lpsolve, mythes, valgrind, ucpp, libetonyek [also needs glm and liblangtag], xmlsec, avahi*) after the main deps libfreehand, liblangtag, libmspub, libzmf (and with DOC=yes for everything), plus hunspell-en; but i'll try binary pkg libreoffice first.
October 29, 2025 at 9:22 PM
Nice, mine is basically the same but using xor() and 0/1 instead. I did every possible combination then minimised rather than building up.

For part 2 I used lpSolve but I suspect could just use lm() with a bit of care in the few cases with multiple solutions.
December 11, 2025 at 1:27 AM