When I got to the point you (the OP) are at right now, I found

Productivity Module Math. Then i started understanding the calculations and found, that I wanted to not follow them to the letter but rather set my own assumptions and priorities (note: there is a "optimal" solar panel to accumulator ratio. When calculating the higher need for energy caused by modules, this ratio is taken into account).

It took me like a month of my spare time to finish them in excel, as I'm not that smart on math and economics as many others here are (or able to spend that much time).

I'd recommend to give it a shot and try to figure it out, if you'd like:

Knowing that beacon and machine placement is was crucial at that point, it took me down to beacon placement (though after finishing my calculations, I found new interesting concepts of beacon placement here and on reddit etc.

example).

This post gives a very good introduction in beacon calculations. After getting to its point, I again started my own research here.

For each different beacon layout, there are optimal values, too. The most used "standard" beacon-machine placing looks somewhat like,

BBBBBB

=MMM=

BBBBBB

=MMM=

BBBBBB

( hint: for this layout, number of modules is: { beacon ( ( 3 + machines per row ) + ( 3 + machines per row ) * rows ) * 2 } + { assembling machines ( machines per row * rows ) * slots ) }

Though, with different layouts, lengths of rows and columns, the calculations for beacons per machine, modules per machine, thus R and thus ROI and so on change, of course.

Enjoy!