user_param.hpp file
User-defined named parameters for constraint expressions.
Defines the UserParam struct, which stores a named constant or monthly-indexed parameter for use in pseudo-AMPL constraint scripts.
Parameters can be defined in a pseudo-AMPL script file:
# Scalar parameter param pct_elec = 35; # Monthly-indexed parameter (jan..dec) param irr_seasonal[month] = [0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 0, 0];
Or in JSON:
{"name": "pct_elec", "value": 35.0} {"name": "irr_seasonal", "monthly": [0,0,0,100,100,100,100,100,100,100,0,0]}
When a monthly-indexed parameter is referenced in a constraint, the value is automatically resolved using the stage's calendar month.
Namespaces
- namespace gtopt
Classes
- struct gtopt::UserParam