Class TradeModel
java.lang.Object
org.episteme.social.economics.trade.TradeModel
Implements standard international trade models, such as the Gravity Model of Trade.
The Gravity Model predicts bilateral trade flows based on the economic sizes (often GDP) and distance between two units.
Formula: F_ij = G * (M_i * M_j) / D_ij
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic RealCalculates the expected trade flow between two nations using the standard Gravity Model.static RealgravityExtended(Real gdpA, Real gdpB, Real distance, Real constantG, double alpha, double beta, double gamma) Extended Gravity Model including population.
-
Method Details
-
gravity
public static Real gravity(Nation nationA, Real gdpA, Nation nationB, Real gdpB, Real distance, Real constantG) Calculates the expected trade flow between two nations using the standard Gravity Model.- Parameters:
nationA- The first nation.gdpA- The GDP of the first nation.nationB- The second nation.gdpB- The GDP of the second nation.distance- The distance between the two nations (in km or similar unit).constantG- The gravity constant (empirically determined).- Returns:
- The predicted trade volume.
-
gravityExtended
public static Real gravityExtended(Real gdpA, Real gdpB, Real distance, Real constantG, double alpha, double beta, double gamma) Extended Gravity Model including population. F_ij = G * (GDP_i^a * GDP_j^b) / D_ij^c- Parameters:
gdpA- GDP of nation AgdpB- GDP of nation Bdistance- DistanceconstantG- Base constantalpha- Exponent for GDP Abeta- Exponent for GDP Bgamma- Exponent for Distance (friction)- Returns:
- Predicted trade volume
-