Parameter Module – cyclopts.params

This module defines a series of objects that represent entities that can be composed into a representation of a parameter space.

author:Matthew Gidden <matthew.gidden _at_>
class cyclopts.params.BoolParam(cutoff, dist=None)[source]

A class to sample binary events


cutoff : float

the probability cutoff, must be in (0, 1]


Returns True if sampled below the cutoff, False otherwise

class cyclopts.params.CoeffParam(lb=0, ub=1, dist=None)[source]

A class to sample coefficient values


lb : float

the coefficient lower bound

ub : float

the coefficient upper bound

dist :str :

the distribution to use, default is uniform


Returns a sampled coefficient

class cyclopts.params.Param(avg, dist=None)[source]

A class to sample events.


avg : float

average value

dist : str

string representation of a distribution


Return a value sampled from the distribution

class cyclopts.params.SupConstrParam(cutoff, rand=False, fracs=None)[source]

A base class for sampled supply constraint values.


cutoff : float

the lowest supply fraction

rand : bool

if True, a random supply fraction greater than or equal to the cutoff is provided during sampling; if False, the cutoff fraction is used

fracs : list

a collection of fractional values of commodity demand that the supply constraint value could take; default is [0.25, 0.5, 0.75, 1]


Returns a fractional supply constraint value for a commodity

Previous page

← Python API

This Page