Parametric Variables#
from gana import Prg, I, T
p = Prg()
Index Sets#
Parameteric variables can (ideally should) be declared at some index
p.y = I(size=2, tag='year')
p.p = I('pv', 'wf', tag='variable renewable energy processes')
Parameteric#
p.capex = T(p.p, p.y, _=[(2000, 2010), (4000, 4020), (3000, 3010), (3500, 3530)])
The order of the index elements is utilized to assign parameter values.
In this example, the index is process*years or {PV, WF}x{year1, year2} = {(PV, year1), (PV, year2), (WF, year1), (WF, year2)}
p.capex.map
{(pv, y[0]): capex[0],
(pv, y[1]): capex[1],
(wf, y[0]): capex[2],
(wf, y[1]): capex[3]}
Printing#
p.capex.show(True)
\[\displaystyle {{capex}}_{pv, y{0}}\]
\[\displaystyle {{capex}}_{pv, y{1}}\]
\[\displaystyle {{capex}}_{wf, y{0}}\]
\[\displaystyle {{capex}}_{wf, y{1}}\]