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¶
bool: whether all commodities have single source/sink. |
|
Shared object for network objects. |
|
Get names and values for all vectors making up demand func. |
|
Whether demand function consists of single commodity only. |
|
Whether demand function consists of more than one commodity. |
|
Get value of demand function h(1). |
|
Get all unique sources. |
Methods¶
|
Reset cache values. |
|
Get the total inflow of all commodities for demand(param). |
|
Get the total inflow of all commodities for demand'(param). |
|
Get maxmimum inflow for every commodity. |
|
Delete all commodities that are made up by |
Map labels -> ids for all commodities. |
|
Map ids -> labels for all commodities. |
|
|
Decompose all commodities in demand vectors. |
|
Add demand data to xml.etree.ElementTree.Element. |
|
|
|
Generate dict to save object with numpy.savez. |
|
Save object into a single file in uncompressed |
|
Construct object from |