The final demand

In openLCA, a product system is calculated for a single demand value for a technosphere flow: a product output or waste input of the system. It is the quantitative reference of the system. In the general case, a system can have multiple demand values organized in a final demand vector \(f\) which is indexed in the same way as the technology matrix (Note that an multi-demand system can be transformed into a single demand system by simply adding an additional process column to the the technology matrix). In the result calculation, the technosphere matrix \(A\) is scaled by a scaling vector \(s\) to fulfill the final demand.

$$ f = \sum_j{A[:, j] * s_j} = A * s $$

RESTGET result/{result-id}/demand
IPCresult/demand
Python IPCResult.get_demand
Return typeTechFlowValue

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/demand",
      params: {
        "@id": "841c7110-4106-49d3-8447-38acc0805ca5",
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   id: 1,
  //   result: {
  //     amount: 1,
  //     techFlow: {
  //       provider: {
  //         "@type": "Process",
  //         "@id": "4446fcf6-7b87-4eb6-9529-775f3fe0c016",
  // ...