Policy Optimization
JCGEOptimize searches for policy settings that meet an economic objective and satisfy constraints on the outcomes. It proposes candidate policies. The CGE solver computes the equilibrium for each candidate, and the search uses those results to measure performance and check feasibility.
Choose production-tax rates
The StandardCGEPolicyOptimization example searches for production-tax rates on bread and milk that maximize household utility while raising at least as much government revenue as in the baseline. Differential Evolution proposes tax rates within the specified bounds, and Ipopt solves the CGE model for each candidate.
Install JCGEExamples from the General registry in your Julia project.
import Pkg
Pkg.add("JCGEExamples")using JCGEExamples.StandardCGEPolicyOptimization
result = run_example()
tax_rates = result.optimization.best.decisions
checked_utility = result.checked.utility
checked_revenue = result.checked.revenueThe result gives the best feasible tax rates found by the search and the revenue and utility obtained by solving that policy again.
Apply it to your model
Add JCGEOptimize to your Julia project.
import Pkg
Pkg.add("JCGEOptimize")- Define the policy decisions and their bounds, such as the allowed tax rates.
- Run the model for each proposed policy. Use the solver status and residuals to decide which outcomes are valid for comparison.
- Define the objective and constraints on those outcomes, such as a material reduction target or a public spending limit. Use the evaluation history to see which policies were feasible and compare their outcomes.
The JCGEOptimize documentation provides the API for defining and evaluating a search.
To make a search available to agents, see Run a Policy Search through MCP.