API Reference
NLP_to_MPSGE_Example.ModelDataNLP_to_MPSGE_Example.ModelParametersNLP_to_MPSGE_Example.MCP_modelNLP_to_MPSGE_Example.MPSGE_modelNLP_to_MPSGE_Example.NLP_modelNLP_to_MPSGE_Example.report
NLP_to_MPSGE_Example.ModelData — TypeModelDataHolds the initial data for the economic model.
Fields
initial_exports::Float64: Initial exports value.initial_imports::Float64: Initial imports value.initial_production::Float64: Initial production value.initial_consumption::Float64: Initial consumption value.domestic_demand::Float64: Domestic demand value.domestic_supply::Float64: Domestic supply value.initial_consumer_price_index::Float64: Initial consumer price index.initial_world_import_price::Float64: Initial world import price.initial_world_export_price::Float64: Initial world export price.initial_domestic_price::Float64: Initial domestic price.
Default Values
initial_exports = 25.0initial_imports = 25.0initial_production = 100.0initial_consumption = 100.0domestic_demand = 75.0domestic_supply = 75.0initial_consumer_price_index = 1.0initial_world_import_price = 1.0initial_world_export_price = 1.0initial_domestic_price = 1.0
NLP_to_MPSGE_Example.ModelParameters — TypeModelParametersHolds the parameters for the models.
Fields
elas_substitution::Float64: Elasticity of substitution.elas_transformation::Float64: Elasticity of transformation.balance_of_payments::Float64: Balance of payments.price_world_export::Float64: World export price.price_world_import::Float64: World import price.tax_import::Float64: Import tax.subsidy_export::Float64: Export subsidy.tax_domestic::Float64: Domestic tax.
Default Values
elas_substitution = 0.2elas_transformation = 0.2balance_of_payments = 0.0price_world_export = 1.0price_world_import = 1.0tax_import = 0.0subsidy_export = 0.0tax_domestic = 0.0
NLP_to_MPSGE_Example.MCP_model — MethodMCP_model(data::ModelData; subexpressions = false)Creates a Mixed Complementarity Problem (MCP) model based on the provided ModelData. If subexpressions is set to true, intermediate variables for revenues and costs are created for better clarity in the model formulation.
This model is included as an example of the explict MCP equation generated by MPSGE. It was initially created to test a bug. This model will solve for most parameter values if subexpressions=false, but may fail to solve for some parameter values if subexpressions=true.
The report will not work with this model.
NLP_to_MPSGE_Example.MPSGE_model — MethodMPSGE_model(data::ModelData)Creates an MPSGEModel based on the provided ModelData. The numeraire is PQ, the consumer price index, which is fixed to 1.
Parameters
sigma: Elasticity of substitutionomega: Elasticity of transformationBBAR: Balance of paymentsPWE: World export pricePWM: World import priceTM: Import tax rateTE: Export subsidy rateTD: Domestic tax rate
Sectors
X: Production sectorQ: Consumption sector
Commodities
PFX: Nominal exchange ratePX: Producer price indexPQ: Consumer price indexPDD: Domestic price excluding taxes
Consumers
Y: Representative Agent
NLP_to_MPSGE_Example.NLP_model — MethodNLP_model(data::ModelData)Creates a JuMP model representing the NLP economic model based on the provided ModelData.
The numeraire is PQ, the consumer price index, which is fixed to 1.
Parameters
sigma: Elasticity of substitutionomega: Elasticity of transformationBBAR: Balance of paymentsPWE: World export pricePWM: World import priceTM: Import tax rateTE: Export subsidy rateTD: Domestic tax rate
Variables
DD: Domestic DemandDS: Domestic SupplyM: ImportsE: ExportsX: Compound good (production)Y: PNBPX: Producer price indexPQ: Consumer price indexPED: Export price including subsidyPMD: Import price including dutiesPDT: Domestic Price including taxesPDD: Domestic Price excluding taxesPFX: Nominal exchange rateQ: Consumption of the compound goodGR: Government Revenue
NLP_to_MPSGE_Example.report — Methodreport(M::JuMP.Model)
report(M::MPSGEModel)Generates a report DataFrame summarizing key variables from the provided model M.
Columns
sigma: Elasticity of substitutionomega: Elasticity of transformationBBAR: Balance of paymentsPWM: World import pricePWE: World export priceTX: Export subsidyTM: Import taxTD: Domestic taxPED: Export price including subsidyPMD: Import price including dutiesQ: Consumption of the compound goodPD: Domestic price excluding taxesTCR: Real exchange rateTCRE: Real exchange rate for exportsTCRM: Real exchange rate for importsTCERQ: Real effective echange rate for consumptionTCERX: Real effective exchange rate for productionTCN: Nominal exchange rateE: ExportsDD: Domestic demandM: Imports