Inventory result

This method returns the inventory result \(g\) of the calculated product system. This is the amount \(g_i\) of each intervention flow \(i\) that crosses the boundary to the environment related to the final demand of product system. It can be calculated by multiplying the intervention matrix \(B\) with the scaling vector \(s\):

$$ g = B * s $$

RESTGET result/{result-id}/total-flows
IPCresult/total-flows
Python IPCResult.get_total_flows
Return typeList[EnviFlowValue]

It is also possible to get the inventory result \(g_i\) of a single flow \(i\):

RESTGET result/{result-id}/total-flow-value-of/{envi-flow}
IPCresult/total-flow-value-of
Python IPCResult.get_total_flow_value_of
Return typeEnviFlowValue
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/total-flows",
      params: {
        "@id": "66dcc7d0-ce47-46bf-b77a-ada4b4c95169",
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   result: [
  //     { enviFlow: { flow: [Object], isInput: false }, amount: 5.316452367058923e-12 },
  //     { enviFlow: { flow: [Object], isInput: false }, amount: 0.0000020503441278781976 },
  //     { enviFlow: { flow: [Object], isInput: false }, amount: 2.2757672132330865e-10 },
  //     { enviFlow: { flow: [Object], isInput: false }, amount: 5.003477809709274e-7 },
  //     { enviFlow: { flow: [Object], isInput: true }, amount: 0.0013196599415652454 },