Prices are tricky; their values depend on your assumptions (or embedded assumptions), and how the accounting rules are structured. The simplest I’ve heard of are from vertically integrated regulated utilities that base prices on the average annual cost of running the system.
ERCOT market pricing is a bit more complicated and based on bids for day-ahead, real-time, capacity, plus other fine print (I’m not an expert in that).
The easiest place to start (if you’re running it as a pure linear problem) is dual values of the satisfy load constraint.
That will be the long-run marginal costs, which can include capital costs (generation, transmission, distribution, etc). These will be different than the variable cost of individual generators. Those long run marginal costs can spike if a peak load timepoints prompted installation of more system resources.
If you’re running it as a mixed integer problem, the dual values can’t be reliably interpreted.
If you want to mimic actual ERCOT pricing, you’d probably need to write a specialized module. A rough estimation based on variable cost of generation would be easier, but you’d need to pick some rules for transmission.. If an expensive generator is providing 5% of energy in zone A, and zone A exports to zones B & C, do you assign its variable costs to the entire system, or is one zone stuck with the entire cost? Switch doesn’t simulate which load zone is contracting with which generator; it just satisfies system-wide constraints for satisfying load, reliability, etc.
Some other wrinkles is how to mimic long-term contracts like PPA or day ahead markets.. Simple market assumptions could say all zones pay the marginal price of the highest accepted bid (which in theory is the marginal cost of generation), but that misses some important mechanisms of lowering the overall price.
Hope that helps a little. Others who work more with markets may have better ideas than me.
Cheers,
Josiah