Popularity is a number between 0 and 100, it represents the percentage of people that know about the productĭesirability is how close the product price is to the price that the customers prefer to buy at. Variable sims hold the amount of customers in the simulation, which for my case is 1,000,000ĪvgPercent is the set percent that average customers would spent their wealth on the product. Local totalSpent = ( * defBuying) / simsĬ += * defBuying Local defBuying = math.min(possiblyBuying, product) Local possiblyBuying = WhomKnow * (0.25 * desireability) Local WhomKnow = math.floor(sims * () / 100) Local desireability = ((wealthValue*avgPercent) / trueprice)^2 My new system works like this: local function RunCustomers() I’m back 6 months later, and for anyone wondering I’ve completely scrapped the system mentioned above. I’m not an expert at this, so if anyone who has a greater knowledge of markets sees this, please correct me on any miscalculations/flaws! If demand > 1 and compbal.Value> newfactorycost thenĪssets.Value = (supply * costproduction) + compbal.Value If supply > 1 and customer.bal > price then Price*= (supply+demand-supplychange)/supplyįor _, customer in pairs(customerdata) do Newfactorycost: the cost to make a new factoryĬlock: a clock that controls the rate of the market server-wideĬode: local clock = Price: The sale price of each product CustomerData: Popularity: The popularity of the productĬostproduction: avg. For the 0.1.3 update of Delicate Stocks, I’ve decided to scrap the old system of company value being based on an average of 2 perlin noises to an actual market with simulated customers and asset - liability based company valuation.Ĭombal: The company’s balance / spendable valueĪssets: The value of all of the company’s assetsĮco: The economic status (between 1 and 0.5, perlin noise based)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |