Example #1
0
 class Schema(NodeSchema):
     # The main attributes are not validated (i.e. `Raw`)
     # They could be many different things.
     min_flow = fields.ParameterReferenceField(allow_none=True)
     cost = fields.ParameterReferenceField(allow_none=True)
     storage_node = fields.NodeField()
     release_values = DataFrameField()
     scenario = fields.ScenarioReferenceField(allow_none=True)
Example #2
0
 class Schema(NodeSchema):
     # The main attributes are not validated (i.e. `Raw`)
     # They could be many different things.
     max_volume = fields.ParameterReferenceField(required=False)
     min_volume = fields.ParameterReferenceField(required=False)
     cost = fields.ParameterReferenceField(required=False)
     initial_volume = fields.ParameterValuesField(required=False)
     initial_volume_pc = marshmallow.fields.Number(required=False)
     bathymetry = DataFrameField()
     weather = DataFrameField()
Example #3
0
    class Schema(NodeSchema):
        # The main attributes are not validated (i.e. `Raw`)
        # They could be many different things.
        # TODO add turbine max_flow in here
        min_flow = fields.ParameterReferenceField(allow_none=True)
        cost = fields.ParameterReferenceField(allow_none=True)

        storage_node = fields.NodeField()
        turbine_elevation = marshmallow.fields.Number()
        generation_capacity = marshmallow.fields.Number()
        min_operating_elevation = marshmallow.fields.Number()
        efficiency = marshmallow.fields.Number()
        density = marshmallow.fields.Number()

        # Default values for missing inputs.
        # Assume inputting for Mm3/day (1e6) and MW (1.15741e-11)
        flow_unit_conversion = marshmallow.fields.Number(missing=1e6)
        energy_unit_conversion = marshmallow.fields.Number(missing=1.15741e-11)
Example #4
0
    class Schema(NodeSchema):
        # The main attributes are not validated (i.e. `Raw`)
        # They could be many different things.
        max_volume = fields.ParameterReferenceField(required=False)
        min_volume = fields.ParameterReferenceField(required=False)
        cost = fields.ParameterReferenceField(required=False)
        initial_volume = fields.ParameterValuesField(required=False)
        initial_volume_pc = marshmallow.fields.Number(required=False)
        bathymetry = DataFrameField()

        #Weather and rainfall / evaporation are mutually exclusive. If both
        #are specified, then weather will be used (to simplify logic because
        #the the other way around requires checking that both rainfall & evaporation
        #are set

        weather = DataFrameField()
        weather_cost = fields.ParameterReferenceField(required=False)

        rainfall = fields.ParameterReferenceField(required=False)
        rainfall_cost = fields.ParameterReferenceField(required=False)
        evaporation = fields.ParameterReferenceField(required=False)
        evaporation_cost = fields.ParameterReferenceField(required=False)
Example #5
0
 class Schema(NodeSchema):
     min_flow = fields.ParameterReferenceField(allow_none=True)
     cost = fields.ParameterReferenceField(allow_none=True)
     max_flow = DataFrameField()
     proportion = marshmallow.fields.Number()
Example #6
0
 class Schema(NodeSchema):
     min_flow = fields.ParameterReferenceField(allow_none=True)
     cost = fields.ParameterReferenceField(allow_none=True)
     max_flow = DataFrameField()
     scenario = fields.ScenarioReferenceField(allow_none=True)