GNU MathProg

1 program Added 2026-02-27T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: GMPL, GNU Mathematical Programming Language
Provenance: commit a324420ac2 · authored 2026-02-27T13:00:52+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

AMPL (0.66)MPL (0.60)CMPL (0.53)Zimpl (0.52)Apl (0.42)

LLM-contributed programs

Transportation Problem

Provenance: commit a324420ac2 · authored 2026-02-27T13:00:52+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.mod · license: Public Domain · added: 2026-02-27T10:00:00Z
/* Transportation Problem in GNU MathProg (GMPL) */

set ORIG;  /* origins */
set DEST;  /* destinations */

param supply{ORIG} >= 0;   /* supply at each origin */
param demand{DEST} >= 0;   /* demand at each destination */
param cost{ORIG, DEST} >= 0;  /* cost per unit shipped */

var x{ORIG, DEST} >= 0;   /* units shipped */

minimize total_cost:
    sum{i in ORIG, j in DEST} cost[i,j] * x[i,j];

s.t. supply_limit{i in ORIG}:
    sum{j in DEST} x[i,j] = supply[i];

s.t. demand_req{j in DEST}:
    sum{i in ORIG} x[i,j] = demand[j];

data;

set ORIG := Plant1 Plant2 Plant3;
set DEST := Whouse1 Whouse2 Whouse3;

param supply :=
    Plant1  120
    Plant2   80
    Plant3   80;

param demand :=
    Whouse1  150
    Whouse2   70
    Whouse3   60;

param cost :
              Whouse1  Whouse2  Whouse3 :=
    Plant1        2        3        1
    Plant2        5        4        8
    Plant3        5        6        8;

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 GNU 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/GNU MathProg/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← GNU Guile GNU Octave →