Direct contributions

This method returns the direct contribution of each process \(j\) in the system to the impact assessment result of an impact category \(k\). Mathematically, this is the row \(H[k, :]\) of the direct impact matrix which can be calculated in the following way:

$$ H = C * B * diag(s) $$

RESTGET result/{result-id}/direct-impact-values-of/{impact-category}
IPCresult/direct-impact-values-of
Python IPCResult.get_direct_impact_values_of
Return typeList[TechFlowValue]
Parameter typeRef[ImpactCategory]

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/direct-impact-values-of",
      params: {
        "@id": "86b36d3b-1dba-4804-bd61-dc5bcaf7c86c",
        impactCategory: {
          "@id": "dbdd01d5-2be4-3ba4-8127-de89f065fda1",
        },
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  //  {
  //     jsonrpc: "2.0",
  //     result: [
  //       {
  //         techFlow: { provider: [Object], flow: [Object] },
  //         amount: 0.00008582892489209728
  //       },
  //       { techFlow: { provider: [Object], flow: [Object] },
  //         amount: 2.023594297933216 },
  //    ...