Presamples is used to write, load, manage and verify presample arrays.
Presample arrays refer to arrays of values that specific parameters can take on. Presamples allows these arrays to be generated ahead of their use in a particular model. This is useful if:
- Generating these values is computationally expensive and there is no need to recalculate them with each model run;
- We want to reuse the same values every time a model is solved.
Presamples was initially built specifically for parameters used in life cycle assessment (LCA), and hence has many methods specifically geared at making the integration of presamples in LCA models easy. However, it can be used in any other type of model.
Presample’s source code is hosted on github.
- The objectives of presamples
- Simple example: Fertilizer inputs to cereal production in Canada
- Creating presample packages for data inputs
- Direct interface to presamples package
- Loading packages for use one column at a time
- Storing a model’s output as a presample package
- Creating presample packages with seeded indexers
- Creating presample packages with sequential indexers
- Using presamples to override input values
- Storing a presample resource
Campaignsto manage sets of presample packages
- Using presamples with brightway2
- Technical reference