The economic calculation problem

I don't have many here, but this paper summarizes it, check the references at the end too

Here, I'll write a labor price calculation program in shitty pseudocode right here:
// Linear time, multiple iterations estimation of labor valuesmap laborValCalcIteration(map commodities) { for (c in commodities) { double deptotal = 0 for (depID in c.dependencies) { commodity dep = commodities[depID] total += dep.deptotal + dep.directlabor } c.deptotal = deptotal } return commodities}map laborValCalcForNIters(map commodities, int count) { for (int i in 0...count) { commodities = laborValCalcIteration(commodities) } return commodities}
This solves half of the calculation problem. The other half is calculation in kind, which Cockshott's program solves.

Whoops, correction, it is log linear because the dependencies are proportionate to the log of the total commodities.

also forgot to include multiplying the dep stuff by their ratio.

No they arent. The dependencies for production are not dependent on the amount of commodities in production. A simple loaf of bread takes the same input even if you create 20 new kinds of bread. Its relatively constant, so the algorithm is linear time.

Also you dont need to return your map since you change it in place, and you wrote "total" instead of "deptotal"also fuck one letter variable names tbh

C Y B E R N E T I C S

fuck those names, tbh.
here's a simple take to make that shit code a little bit easier to read. (haven't read cockshott yet, interpretation might be wrong)

// calculates total dependecy labor cost for each commodity in a single iterationmap calculateLaborValueOfCommoditiesSingleIteration(map commodities) { for (commodity in commodities) { for (dependecy in commodity.dependencies) { commodity.totalDependecyLabor += dependecy.totalDependecyLabor + dependecy.directlabor } } return commodities}// calculates total dependecy labor cost for each commodity after a given number of iterationsmap calculateLaborValueOfCommodities(map commodities, int iterations) { for (int i in 0...iterations) { commodities = calculateLaborValueOfCommoditiesSingleIteration(commodities) } return commodities}

here's a brainlet attepmt at a haskell implementation

data Commodity = Commodity { totalDependecyLabor :: Integer directlabor :: Integer dependecies :: [Commodity] }calculateIteration :: [Commodity] -> [Commodity]calculateIteration = fmap calculateDependecies calculateDependecies :: Commodity -> CommoditycalculateDependecies comm = comm { totalDependecyLabor = foldr ( (+) . directlabor ) 0 (dependecies comm) }

You can't really compare these two periods, during Stalin's industrialisation the economy was focused on raw production output and raw infrastructure, after Stalin services and consumer items became important and both these things must be addressed differently, the former is good with central planning the latter requires a bit of decentralised planning.

read cockshott

check out github.com/wc22m/5yearplan
and the instruction video youtube.com/watch?v=Pqzj5hrnDCk