Imagine, I have following model.
There is a company X, which produces one unit of final output from
- 0.2 units of input A and
- 0.8 units of input B.
Inputs A and B are bought from respective markets.
- the market price of A be 40 dollars,
- the market price of B be 20 dollars and
- the available money of the company be 200 dollars.
Question: How can I calculate the maximum amount of final output given those constraints?
Note: Ideally, that solution should be easily expandable to a case where there are more than 2 inputs.
I tried to solve this problem in the following way:
I divided the available money in 2 parts:
- 40 dollars for buying input A and
- 160 dollars for buying input B.
For 40 dollars, you can buy 1 unit of input A. For 160 dollars, you can buy 160/20 = 8 units of input B.
It would be no problem, if there were 2 units of A and 8 units of B, but in our case the proportions don't match.
Update 1: I need this algorithm for builing a simple model of the economy of a midsized (100 000 inhabitants) town in Russia.
Purpose of the that model of the economy: To answer questions like
- By how much will the unemployment change during and after the construction of a hospital?
- By how much will the regional GDP change, if we build a road from point A to point B?
I have data about
- how companies of different industries transform inputs into outputs (all-Russian input-output tables) and
- the number and sizes of companies of different industries in the city in question (regional statistics).
Using those data I can create a set of synthetic companies such that the characteristics of those virtual companies are similar to real ones.
The next step is to enable the companies to exhange goods between
- each other and
- final customers.
I decided to create a model of markets (I was inspired by the EOS framework, but want to develop my own model, with blackjack and other subtleties, in order to fully understand how it works).
As far as I understand, in each simulation step, following things need to happen:
- Every company decides, how much output it wants to produce in year N. In the simplest case, target output is equal to the amount of final product sold in year N-1.
- Then, the company buys inputs at the markets for every input.
- Then, the company produces the output from the resources it has. The quantity of the produced output is max. target output from step 1 (in case it could buy enough of each input), or less (if it couldn't buy enough of some of the inputs).