Based on these parameters, the linear programming package lp_solve
is used to determine an optimal production plan. This means, lp_solve
is able to calculate the intensities at which the various production methods need to run (i.e. three machines mining for coal), such that the maximum number of consumer products at the specified proportions can be made available to consumers. Of course there are external limitations, such as the overall number of people able to work and produce goods. The plan cannot violate any of these economic conditions. So, for example, it can use no more labour than is available and all the coal that is used in production has to be actually produced as part of the plan. It also cannot involve more carbon dioxide emissions than is allowed for by the cap on greenhouse gases. In order to ensure this, the information specified in the tables and the resource vector is converted into linear inequalities which are used as constraints for the linear programming problem then solved using lp_solve
. The linear constraints also ensure that production is at the proportions specified in the plan target. The overall output of any individual consumer product can then be used as the “objective function” which is to be maximised. Linear programming starts by finding a feasible solution (in our case a production plan) and then successively adjusts the solution until it is optimised.
While the simulation only considers linear relationships, some non-linearities can easily be represented as such. Examples of non-linearities are economies of scale or the diminishing harvest as less fertile land has to be used with the expansion of agriculture. In these cases inputs and outputs of production methods are not directly proportional to the intensity of use, as is assumed by our input and output tables. Economies of scale can, however, be represented by including separate linear methods of production which might be more efficient, but which can only be used at large scales. The decreasing marginal yield of agriculture due to varying soil quality can be represented by specifying distinct agricultural production methods depending on soil type. Land of a certain fertility will be an input requirement with limited availability for the according production methods, as there is a limited amount of that type of land that can be used. Other non-linearities can be represented or at least approximated in a similar fashion.