コード例 #1
0
        public void SimEconomy()
        {
            Demand += demand * PopulationGrowth;//Natural growth of the demand based on increase in the population
            int    c    = Demand.CompareTo(Supply);
            double newp = 0f;

            switch (c)
            {
            case 1:
                newp = (0.2 * (min / capacity)) + min;    //new price old price+20%
                double b = price - (slope * capacity);
                Demand   += (slope * capacity) - b;
                capacity += capacity * GDP_Growth;
                inf       = (newp - price) / price;
                price     = newp;
                gdpG      = (pg + inf);
                break;

            case 0:

                break;

            case -1:
                newp      = System.Math.Max(price - (0.1 * price), (min / capacity) + min);
                Inflation = newp;
                capacity -= capacity * GDP_Growth;
                break;
            }
            pg -= -(gdpG * slope);
            StandardWageGrowth();
        }