Outputs

This module provides the framework for output from SimKit. It is similar to the data layer except output sources are always calculations.

Output Parameter

class simkit.core.outputs.OutputParameter(*args, **kwargs)[source]

Fields for outputs.

Parameters
  • units – output units

  • init – initial value

  • size – array size

  • isconstant (bool) – constant value flag

  • isproperty (bool) – material property flag

  • timeseries – name of corresponding timeseries output

Output Registry

class simkit.core.outputs.OutputRegistry[source]

A registry for output from calculations.

Output Base

class simkit.core.outputs.OutputBase[source]

Metaclass for outputs.

Setting the __metaclass__ attribute to OutputBase adds the full path to the specified output parameter file as param_file or adds parameters with outputs specified. Also checks that outputs is a subclass of Output. Sets output_path and output_file as the class attributes that specify the parameter file full path.

Output

class simkit.core.outputs.Output[source]

A class for formatting outputs.

Do not use this class directly. Instead subclass it in your output model and list the path and file of the outputs parameters or provide the parameters as class members.

Example of specified output parameter file:

import os

PROJ_PATH = os.path.join('project', 'path')  # project path


class PVPowerOutputs(Output):
    outputs_file = 'pvpower.json'
    outputs_path = os.path.join(PROJ_PATH, 'outputs')

Example of specified output parameters:

class PVPowerOutputs(Output):
    hourly_energy = {'init': 0, 'units': 'Wh', 'size': 8760}
    yearly_energy = {'init': 0, 'units': 'kWh'}