NationStates Jolt Archive


National Budget

Seriphyn
04-12-2004, 10:51
As you probably know, the NationStates GDP calculator (here (http://www.pipian.com/stuffforchat/gdpcalc.php?nation=) ) shows your country's national budget (mine is currently $15 trillion)

Now, how does it calculate this? Is it something to do with income tax plus economy? Or is it how u deal with issues? Or is it both?
The Phoenix Milita
04-12-2004, 12:10
It takes your econmy rating, which is decided on by issues, and gives you a gdp per capita based on the rating, and then multiplies that by the amount of ppl u have. Then your budget it a percentage of the overall GDP based on taxes
The Most Glorious Hack
04-12-2004, 12:11
Issues affect your economy.

Calculators assign a certain dollar value to the economic levels. It takes that and multiplies it by your population (and often some other variables) to get your GDP. They then take a portion of the GDP for the national budget. The percentage taken is related to your tax rate (also controled by issues).
The Phoenix Milita
04-12-2004, 12:12
blah!
Tuesday Heights
04-12-2004, 12:57
blah!

And that adds what to this thread?
The Phoenix Milita
04-12-2004, 13:15
more than what you added, if you read it hack said about the same thing as i did so i was forced to reply with the standard "blah"
Tekania
04-12-2004, 13:17
the GDP is derived by the following sets of equations....

First the application assigns number values based off of your Civil Rights and Economic ratings into values for CONSUMER_CONFIDENCE_CIVIL_EFFECT, PRODUCT_ECONOMY, and CONSUMER_CONFIDENCE_ECONOMIC_EFFECT. The grabs a rating for GOVERNMENT_EFFICIENCY based off the level of corruption; and also takes the value of your POPULATION. It then assigns values based off your Civil and Economic ratings to WORK_ETHIC_CIVIL and WORK_ETHIC_ECONOMIC, and then grabs your TAX_RATE.

It will then Calculate WORK_ETHIC_TAX off of your TAX_RATE + WORK_ETHIC_CIVIL and WORK_ETHIC_ECONOMIC

After that it determines CONSUMER_CONFIDENCE by:

CONSUMER_CONFIDENCE = 1 + CONSUMER_CONFIDENCE_ECONOMIC_EFFECT + CONSUMER_CONFIDENCE_CIVIL_EFFECT.

Complete OUTPUT is then found by:

OUTPUT = PRODUCT_ECONOMY * POPULATION * WORK_ETHIC_CIVIL * WORK_ETHIC_ECONOMIC.

It then figures GOVERNMENT_EXPENSE by:

GOVERNMENT_EXPENSE = OUTPUT * GOVERNMENT_EFFICIENCY * ( TAX + WORKER_ENTHUSIASM * CONSUMSER_CONFIDENCE )

If figures IMPORTS by:

IMPORTS = 1 / CONSUMER CONFIDENCE + TAX * CONSUMPTION / WORK_ETHIC / PRODUCT_ECONOMY

OUTPUT is then used to derive EXPENSES which then determined NET_TRADE by:

NET_TRADE = IMPORT - EXPENSES

and finally GDP is derived by:

CONSUMPTION + NET_TRADE + GOVERNMENT_EXPENSE.

or in short, the actual snippet from the code

while($i < $num_nations) {
if(date('m-d') == "04-01" and !$afddisable) { $population[$i] = 5; }
$work_enth_tax = array(0 => 0.02, 1 => 0, 2 => -0.02, 3 => -0.04, 4 => -0.06, 5 => -0.08, 6 =>-0.1, 7 => -0.12, 8 => -0.14, 9 => -0.16, 10 => -0.18);
$work_enth_econ = array('Frightening' => 0.03, 'All-Consuming' => 0.03, 'Powerhouse' => 0.02, 'Thriving' => 0.02, 'Very Strong' => 0.01,
'Strong' => 0.01, 'Good' => 0, 'Reasonable' => -0.01, 'Fair' => -0.01, 'Developing' => -0.02, 'Weak' => -0.03, 'Fragile' => -0.04,
'Struggling' => -0.05, 'Basket Case' => -0.06, 'Imploded' => -0.07);
$work_enth_civil = array('Frightening' => -0.02, 'Excessive' => 0.01, 'World Benchmark' => 0.05, 'Superb' => 0.04, 'Excellent' => 0.03,
'Very Good' => 0.02, 'Good' => 0.01, 'Average' => 0, 'Below Average' => -0.01, 'Some' => -0.02, 'Few' => -0.03, 'Rare' => -0.04,
'Unheard Of' => -0.06, 'Outlawed' => -0.08);
$work_enth_pol = array('Corrupted' => -0.01, 'Widely Abused' => 0, 'Excessive' => 0.01, 'World Benchmark' => 0.02, 'Superb' => 0.01,
'Excellent' => 0.01, 'Very Good' => 0, 'Good' => 0, 'Average' => 0, 'Below Average' => -0.01, 'Some' => -0.02, 'Few' => -0.02, 'Rare' => -0.03,
'Unheard Of' => -0.03, 'Outlawed' => -0.04);
$work_enth[$i] = 1 + $work_enth_tax[ceil($tax[$i] / 10)] + $work_enth_econ[$economy[$i]] + $work_enth_civil[$civilrights[$i]] +
$work_enth_pol[$politicalfreedom[$i]];
$prod_econ = array('Frightening' => 35000, 'All-Consuming' => 30000, 'Powerhouse' => 25000, 'Thriving' => 20000, 'Very Strong' => 15000,
'Strong' => 10000, 'Good' => 7500, 'Reasonable' => 5000, 'Fair' => 4000, 'Developing' => 3000, 'Weak' => 2000, 'Fragile' => 1000,
'Struggling' => 650, 'Basket Case' => 350, 'Imploded' => 100);
$prod[$i] = $prod_econ[$economy[$i]];
$govt_eff_pol = array('Corrupted' => -0.15, 'Widely Abused' => -0.1, 'Excessive' => -0.05, 'World Benchmark' => -0.01, 'Superb' => -0.02,
'Excellent' => -0.02, 'Very Good' => -0.03, 'Good' => -0.03, 'Average' => -0.04, 'Below Average' => -0.05, 'Some' => -0.06, 'Few' => -0.08,
'Rare' => -0.1, 'Unheard Of' => -0.15, 'Outlawed' => -0.2);
$govt_eff[$i] = 1 + $govt_eff_pol[$politicalfreedom[$i]];
$con_conf_civil = array('Frightening' => -0.01, 'Excessive' => 0.01, 'World Benchmark' => 0.05, 'Superb' => 0.04, 'Excellent' => 0.03,
'Very Good' => 0.02, 'Good' => 0.01, 'Average' => 0, 'Below Average' => -0.01, 'Some' => -0.02, 'Few' => -0.04, 'Rare' => -0.06,
'Unheard Of' => -0.08, 'Outlawed' => -0.1);
$con_conf_econ = array('Frightening' => 0.04, 'All-Consuming' => 0.03, 'Powerhouse' => 0.02, 'Thriving' => 0.02, 'Very Strong' => 0.01,
'Strong' => 0.01, 'Good' => 0, 'Reasonable' => -0.01, 'Fair' => -0.01, 'Developing' => -0.02, 'Weak' => -0.02, 'Fragile' => -0.03,
'Struggling' => -0.04, 'Basket Case' => -0.05, 'Imploded' => -0.06);
$colors_civil = array('Frightening' => 'good', 'Excessive' => 'good', 'World Benchmark' => 'good', 'Superb' => 'good', 'Excellent' => 'good',
'Very Good' => 'med', 'Good' => 'med', 'Average' => 'med', 'Below Average' => 'med', 'Some' => 'bad', 'Few' => 'bad',
'Rare' => 'bad', 'Unheard Of' => 'bad', 'Outlawed' => 'bad');
$colors_pol = array('Corrupted' => 'good', 'Widely Abused' => 'good', 'Excessive' => 'good', 'World Benchmark' => 'good', 'Superb' => 'good',
'Excellent' => 'good', 'Very Good' => 'med', 'Good' => 'med', 'Average' => 'med', 'Below Average' => 'med', 'Some' => 'bad',
'Few' => 'bad', 'Rare' => 'bad', 'Unheard Of' => 'bad', 'Outlawed' => 'bad');
$con_conf[$i] = 1 + $con_conf_civil[$civilrights[$i]] + $con_conf_econ[$economy[$i]];
$out[$i] = $prod[$i] * $population[$i] * 1000000 * $work_enth[$i] * $con_conf[$i];
$cons[$i] = $out[$i] - $out[$i] * $tax[$i] / 100;
$budget[$i] = $out[$i] * $govt_eff[$i] * ($tax[$i] / 100 + $con_conf[$i] * 0.1 + $work_enth[$i] * 0.025);
$govt_exp[$i] = $budget[$i] * $govt_eff[$i];
$imp[$i] = ((1 / $con_conf[$i]) / 8) * ($cons[$i] + $govt_exp[$i]);
// $imp[$i] = (1 / $con_conf[$i] + $tax[$i] / 100) * $cons[$i] / $work_enth[$i] * 10000 / $prod[$i];
$govt_waste[$i] = $budget[$i] - $govt_exp[$i];
$budget_admin[$i] = $budget_admin[$i] / 100 * $govt_exp[$i];
$budget_welfare[$i] = $budget_welfare[$i] / 100 * $govt_exp[$i];
$budget_health[$i] = $budget_health[$i] / 100 * $govt_exp[$i];
$budget_education[$i] = $budget_education[$i] / 100 * $govt_exp[$i];
$budget_spirit[$i] = $budget_spirit[$i] / 100 * $govt_exp[$i];
$budget_defense[$i] = $budget_defense[$i] / 100 * $govt_exp[$i];
$budget_law[$i] = $budget_law[$i] / 100 * $govt_exp[$i];
$budget_com[$i] = $budget_com[$i] / 100 * $govt_exp[$i];
$budget_trans[$i] = $budget_trans[$i] / 100 * $govt_exp[$i];
$budget_env[$i] = $budget_env[$i] / 100 * $govt_exp[$i];
$budget_equality[$i] = $budget_equality[$i] / 100 * $govt_exp[$i];
$i++;
}
$i = 0; $total_imp = 0; $total_out = 0; $total_cons = 0; $total_govt_exp = 0; $total_govt_waste = 0; $total_exp = 0; $total_net_trade = 0;
$total_gdp = 0; $total_population = 0;
while($i < $num_nations) {
$total_imp = $total_imp + $imp[$i];
$total_out = $total_out + $out[$i];
$i++;
}
$i = 0;
while($i < $num_nations) {
$exp_per[$i] = $out[$i] / $total_out;
$exp[$i] = $total_imp * $exp_per[$i];
// $exp_per[$i] = sqrt(sqrt(sqrt(sqrt($prod[$i] / 2500))));
// $exp[$i] = $exp_per[$i] * $imp[$i];
$net_trade[$i] = $exp[$i] - $imp[$i];
$gdp[$i] = $cons[$i] + $net_trade[$i] + $govt_exp[$i];
Mabulia
04-12-2004, 17:26
As you probably know, the NationStates GDP calculator (here (http://www.pipian.com/stuffforchat/gdpcalc.php?nation=) ) shows your country's national budget (mine is currently $15 trillion)

Now, how does it calculate this? Is it something to do with income tax plus economy? Or is it how u deal with issues? Or is it both?

ahhh

use this one its better: http://nseconomy.thirdgeek.com/nseconomy.php?