I am currently modeling a simple short-run marginal cost dispatch for plants in an electricity system. I developed a (slow, iterative) implementation of the problem in Excel/VBA, but am now interested in experimenting with optimization approaches in Mathematica instead.
I have been experimenting with different ways to pose the problem in Mathematica, but have gotten quite stuck, and would appreciate some pointers.
The problem looks more or less like the table below:
If I had a small (and fixed...) number of plants to optimize across, I would write something like the following to minimize the total energy cost, such that (1) no plant exceeds its maximum capacity, (2) the sum of dispatch is equal to demand:
This is where I could use a push in the right direction. In real life, the number of the plants in the model may vary, and total several dozen or more plants. Writing the problem out fully is therefore unwieldy.
Is there a way to pose a variable length minimization problem, perhaps taking advantage of Mathematica's notation capabilities?