[Change] Tweaked some economy values.

This commit is contained in:
Allanis 2014-04-11 22:26:59 +01:00
parent 6844e4f5b8
commit 1d594b669d

View File

@ -1,3 +1,13 @@
/**
* @file economy.c
*
* @brief Handles economy stuff.
*
* Economy is handled with Nodal Analysis. Systems are modelled as nodes,
* jump routes are resistances and production is modeled as node intensity.
* This is then solved with linear algebra after each time increment.
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
@ -20,7 +30,7 @@
/* Economy Nodal Analysis parameters. */ /* Economy Nodal Analysis parameters. */
#define ECON_BASE_RES 30. /**< Base resistance value for any system. */ #define ECON_BASE_RES 30. /**< Base resistance value for any system. */
#define ECON_SELF_RES 30. /**< Additional resistance for the self node. */ #define ECON_SELF_RES 3. /**< Additional resistance for the self node. */
#define ECON_FACTION_MOD 0.1 /**< Modifier on Base for faction standings. */ #define ECON_FACTION_MOD 0.1 /**< Modifier on Base for faction standings. */
#define ECON_PROD_MODIFIER 500000. /**< Production modifier, divide production by this amount. */ #define ECON_PROD_MODIFIER 500000. /**< Production modifier, divide production by this amount. */
@ -392,7 +402,7 @@ int economy_update(unsigned int dt) {
int i, j; int i, j;
double *X; double *X;
double scale, offset; double scale, offset;
double min, max; /*double min, max;*/
/* Create the vector to solve the system. */ /* Create the vector to solve the system. */
X = malloc(sizeof(double)*systems_nstack); X = malloc(sizeof(double)*systems_nstack);