Parameters

Parameters#

from gana import Prg, I, P

p = Prg()

Index Sets#

Parameters 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')

Vectors#

p.capex = P(p.p, p.y, _=[2000, 4000, 3000, 3500])

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]): 2000.0,
 (pv, y[1]): 4000.0,
 (wf, y[0]): 3000.0,
 (wf, y[1]): 3500.0}

Printing#

Parameter names are always capitalized!

p.capex.show()
\[\displaystyle {capex}_{p, y}\]