MathProg

1 program Added 2026-02-26T22:50:17Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: GMPL, GNU MathProg
Provenance: commit 6c909acfc0 · authored 2026-02-26T23:50:47+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

3 sources · pl_id: pl/gnu-mathprog
LLM (this repo) · 1WikipediaWikidata · Q110952622

Related languages

GMPL (0.82)GNU MathProg (0.37)GNU Prolog (0.25)GNU APL (0.19)MathGolf (0.15)

LLM-contributed programs

Production Planning LP

Provenance: commit 6c909acfc0 · authored 2026-02-26T23:50:47+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.mod · added: 2026-02-26T22:50:17Z
/* Simple LP in MathProg (GMPL): Production planning */
/* Maximize profit subject to resource constraints */

var x1 >= 0;   /* units of product 1 */
var x2 >= 0;   /* units of product 2 */
var x3 >= 0;   /* units of product 3 */

maximize profit: 10*x1 + 6*x2 + 4*x3;

s.t. labor:    x1 + x2 + x3 <= 100;
s.t. machine:  10*x1 + 4*x2 + 5*x3 <= 600;
s.t. material: 2*x1 + 2*x2 + 6*x3 <= 300;

solve;

printf "Optimal production quantities:\n";
printf "  x1 = %g\n", x1;
printf "  x2 = %g\n", x2;
printf "  x3 = %g\n", x3;
printf "Maximum profit: %g\n", profit;

end;

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about MathProg (mapped to pl/gnu-mathprog). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/MathProg/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← mathpix-markdown MathSeq →