Skip to content

Commit f6b48be

Browse files
committed
Change to manual_allocation property
1 parent 8f6037a commit f6b48be

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ There is currently no built-in functionality to determine if an edge is function
112112

113113
* `price`: Does economic allocation based on the property "price" in each functional edge.
114114
* `mass`: Does economic allocation based on the property "mass" in each functional edge.
115-
* `manual`: Does allocation based on the property "manual" in each functional edge. Doesn't normalize by amount of production exchange.
115+
* `manual_allocation`: Does allocation based on the property "manual_allocation" in each functional edge. Doesn't normalize by amount of production exchange.
116116
* `equal`: Splits burdens equally among all functional edges.
117117

118118
Property-based allocation assumes that each functional edge has a `properties` dictionary, and this dictionary has the relevant key with a corresponding numeric value. For example, for `price` allocation, each functional edge needs to have `'properties' = {'price': some_number}`.

multifunctional/allocation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def property_allocation(
166166

167167
allocation_strategies = {
168168
"price": property_allocation("price"),
169-
"manual": property_allocation("manual", normalize_by_production_amount=False),
169+
"manual_allocation": property_allocation("manual_allocation", normalize_by_production_amount=False),
170170
"mass": property_allocation("mass"),
171171
"equal": partial(generic_allocation, func=lambda x, y: 1.0),
172172
}

tests/fixtures/basic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"properties": {
2323
"price": 7,
2424
"mass": 6,
25-
"manual": 2,
25+
"manual_allocation": 2,
2626
},
2727
},
2828
{
@@ -34,7 +34,7 @@
3434
"properties": {
3535
"price": 12,
3636
"mass": 4,
37-
"manual": 8,
37+
"manual_allocation": 8,
3838
},
3939
},
4040
{

tests/test_allocation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_price_allocation(basic):
141141

142142

143143
def test_manual_allocation(basic):
144-
basic.metadata["default_allocation"] = "manual"
144+
basic.metadata["default_allocation"] = "manual_allocation"
145145
bd.get_node(code="1").allocate()
146146
check_basic_allocation_results(
147147
0.2 * 10, 0.8 * 10, basic

0 commit comments

Comments
 (0)