Demand Function (Abstract)

Class Description

class paminco.net.demand.DemandFunction(shared=None, dtype_int=None, dtype_float=None)[source]

Abstract class representing a demand function.

Parameters
sharedShared, optional

Shared network object used for label <-> id mappings.

Attributes
cacheCache

A cache.

shared

Shared object for network objects.

all_single_pairs

bool: whether all commodities have single source/sink.

shared

Shared object for network objects.

demand_vectors

Get names and values for all vectors making up demand func.

is_single_commodity

Whether demand function consists of single commodity only.

is_multi_commodity

Whether demand function consists of more than one commodity.

value_at_1

Get value of demand function h(1).

unique_sources

Get all unique sources.

Attributes

DemandFunction._dv0

DemandFunction.all_single_pairs

bool: whether all commodities have single source/sink.

DemandFunction.n

DemandFunction.shared

Shared object for network objects.

DemandFunction.dtype_int

DemandFunction.dtype_float

DemandFunction.demand_vectors

Get names and values for all vectors making up demand func.

DemandFunction.is_single_commodity

Whether demand function consists of single commodity only.

DemandFunction.is_multi_commodity

Whether demand function consists of more than one commodity.

DemandFunction.value_at_1

Get value of demand function h(1).

DemandFunction.unique_sources

Get all unique sources.

Methods

DemandFunction.reset_cache([hard])

Reset cache values.

DemandFunction.inflow(param)

Get the total inflow of all commodities for demand(param).

DemandFunction.ddx_inflow(param)

Get the total inflow of all commodities for demand'(param).

DemandFunction.max_inflow(max_param[, min_param])

Get maxmimum inflow for every commodity.

DemandFunction.delete_nodes(*args, **kwargs)

Delete all commodities that are made up by nodes.

DemandFunction.map_node_label_to_id()

Map labels -> ids for all commodities.

DemandFunction.map_node_id_to_label()

Map ids -> labels for all commodities.

DemandFunction.to_single_pairs(**kwargs)

Decompose all commodities in demand vectors.

DemandFunction.add_to_etree(root[, overwrite])

Add demand data to xml.etree.ElementTree.Element.

DemandFunction.from_xml(data[, shared])

DemandFunction.make_save_dict([prefix, ...])

Generate dict to save object with numpy.savez.

DemandFunction.save_to_numpy(file, **kwargs)

Save object into a single file in uncompressed .npz format.

DemandFunction.from_npz(data[, shared, prefix])

Construct object from .npz file.