Total requirements
This method returns the total requirements of technosphere flows that are needed to fulfill the demand of the calculated product system. Mathematically, this is the diagonal of the technosphere matrix \(A\) scaled by the scaling \(s\):
$$ t = diag(s) * diag(A) $$
REST | GET result/{result-id}/total-requirements |
IPC | result/total-requirements |
Python IPC | Result.get_total_requirements |
Return type | List[TechFlowValue] |
It is also possible to get just the total requirements value of a single technosphere flow \(j\):
$$ t_j = s_j * A[j, j] $$
REST | GET result/{result-id}/total-requirements-of/{tech-flow} |
IPC | result/total-requirements-of |
Python IPC | Result.get_total_requirements_of |
Return type | TechFlowValue |
Parameter type | TechFlow |
Examples
JSON-RPC via Fetch API
The example below shows the usage of this method using the JSON-RPC protocol via the Fetch API which is available in modern web-browsers or platforms like Deno.
let resp = await fetch("http://localhost:8080", {
method: "POST",
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "result/total-requirements",
params: {
"@id": "fa78990c-3f88-455a-9f8f-bd9e536bac28",
}
})
});
let v = await resp.json();
console.log(v);
// {
// jsonrpc: "2.0",
// result: [
// { techFlow: { provider: [Object], flow: [Object] }, amount: 1 },
// { techFlow: { provider: [Object], flow: [Object] }, amount: 1 },
// { techFlow: {
// provider: [Object],
// flow: [Object] },
// amount: 15.151515151515152 }, ..
})();