LinearDemandFunction¶
Class Description¶
- class paminco.net.demand.LinearDemandFunction(b, shared=None, **kwargs)[source]¶
A Linear demand function.
Modelling the function:
demand(param) = param * b.
- Parameters
- bDemandVector, DemandVectorSP, spmatrix or iterable
Demand direction, scales linearly with param.
- sharedShared, optional
Shared object for all network objects.
See also
demand_vector
Initialization of demand vectors.
- Attributes
- bDemandVector or DemandVectorSP
Demand direction, scales linearly with param.
- 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¶
|
Value of demand function: demand(param). |
|
Derivative of demand function: demand'(param). |
Get indices of source and sink, and rates for all commodities. |
|
|
Inflow rate at |
Get the total inflow of all commodities for demand'(param). |
|
|
Reset cache values. |
|
Get the total inflow of all commodities for demand(param). |
|
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. |
|
Load object from |
Generate dict to save object with numpy.savez. |
|
|
Save object into a single file in uncompressed |
|
Construct object from |
|
Inflow rate at |