Mosel
1 program
Added 2026-02-07T13:25:18Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Xpress Mosel
Provenance: commit e46b696b4b · authored 2026-02-07T14:26:21+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Transportation Problem
Provenance: commit e46b696b4b · authored 2026-02-07T14:26:21+01:00 · agent claude-code · model sonnet · WebSearch disabled
model Transportation
uses "mmxprs"
declarations
SOURCES = 1..2
DESTINATIONS = 1..3
supply: array(SOURCES) of integer
demand: array(DESTINATIONS) of integer
cost: array(SOURCES, DESTINATIONS) of real
ship: array(SOURCES, DESTINATIONS) of mpvar
end-declarations
supply :: [20, 30]
demand :: [15, 20, 15]
cost :: [2, 3, 4,
3, 2, 1]
forall(i in SOURCES)
sum(j in DESTINATIONS) ship(i,j) <= supply(i)
forall(j in DESTINATIONS)
sum(i in SOURCES) ship(i,j) >= demand(j)
TotalCost := sum(i in SOURCES, j in DESTINATIONS) cost(i,j) * ship(i,j)
minimize(TotalCost)
writeln("Optimal cost: ", getobjval)
forall(i in SOURCES, j in DESTINATIONS | getsol(ship(i,j)) > 0)
writeln("Ship ", getsol(ship(i,j)), " from ", i, " to ", j)
end-model