Direct contributions

This method returns the direct contribution of each process \(j\) in the system to the inventory result of a flow \(i\). Mathematically, it is the row \(G[i, :]\) of the scaled intervention matrix \(G\):

$$ G = B * diag(s) $$

RESTGET result/{result-id}/direct-flow-values-of/{envi-flow}
IPCresult/direct-flow-values-of
Python IPCResult.get_direct_flow_values_of
Return typeList[TechFlowValue]
Parameter typeEnviFlow

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-flow-values-of",
      params: {
        "@id": "66dcc7d0-ce47-46bf-b77a-ada4b4c95169",
        enviFlow: {
          flow: {
            "@type": "Flow",
            "@id": "5f7aad3d-566c-4d0d-ad59-e765f971aa0f",
            name: "Methane, fossil",
          },
        }
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   result: [
  //     {
  //       techFlow: { provider: [Object], flow: [Object] },
  //       amount: 1.5185665316633185e-8
  //     },
  //     {
  //       techFlow: { provider: [Object], flow: [Object] },
  //       amount: 0.0018045126002407595
  //     }, ...