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) $$

RESTGET result/{result-id}/total-requirements
IPCresult/total-requirements
Python IPCResult.get_total_requirements
Return typeList[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] $$

RESTGET result/{result-id}/total-requirements-of/{tech-flow}
IPCresult/total-requirements-of
Python IPCResult.get_total_requirements_of
Return typeTechFlowValue
Parameter typeTechFlow

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 }, ..
})();