The openLCA core API

How to read this document

This document contains the documentation of the openLCA core API, automatically extracted from the Java documentation of the olca-modules repository (using the jmd tool). The headings of this document follow the structure of the API:

  1. Packages (e.g. org.openlca.core.results)
  2. Types (mainly classes), e.g. ContributionResult
  3. Fields (e.g. techIndex) and methods (e.g. getFlows())

A heading TypeB > TypeA means that the following section is about TypeB which extends TypeA and, thus, has all the methods and fields that TypeA has. The heading fieldC : TypeD means that fieldC is an accessible field (a property) of type TypeD. Finally, a heading methodG(): TypeE means that methodG is a callable method that returns an instance of TypeE. The parameters of that method are directly listed after the heading in the same order as they need to be applied when calling the method. Methods that have the same name as their type (like TypeG()) are constructor methods which create a new instance of that type.

The openLCA core API is a plain Java API that should run on any Java Virtual Machine (JVM) >= v8. Thus, you could use it from any JVM language like Java, Scala, Kotlin, Clojure, Jython, etc. It is also fully exposed to the openLCA development tools within openLCA (Window > Developer tools > Python within openLCA). The Python scripting environment in openLCA uses Jython (a Python implementation that runs on the JVM). The following example shows how the usage of the elements package, type, field, and method:

# import the type 'FlowDao' from the package
# 'org.openlca.core.database'
from org.openlca.core.database import FlowDao

# create a new instance of "FlowDao" by calling
# its constructor method and passing a database
# instance as parameter
dao = FlowDao(db)

# get all flows by calling the method "getAll"
# on the instance of the FlowDao type
flows = dao.getAll()

# writing the value of the field "name" of the
# first flow to the logger output
log.info("Name of the first flow: {}", flows[0].name)

Package: org.openlca.core.database

BlockFetch

Provides the functionality for loading of data for a given set of IDs with a minimal amount of queries but with block sizes of ID sets that are not greater than the allowed maximum list size for queries (see {@link BaseDao#MAX_LIST_SIZE}).

BlockFetch()

Parameters:

undocumented

doFetch() : List<T>

Parameters:

Creates a new BlockFetch and runs the given query function.

doFetch() : List<T>

Parameters:

Split the given IDs into chunks with a size not greater than {@link Dao#MAX_LIST_SIZE}, run the queries and return the results.

DataProviderException > Exception

Exception which can be thrown by data operations.

DataProviderException()

Parameters:

Creates a new instance

@param message The message of the exception

DataProviderException()

Parameters:

Creates a new instance

@param message The message of the exception @param throwable The cause of the exception

DataProviderException()

Parameters:

Creates a new instance

@param throwable The cause of the exception

DatabaseException > RuntimeException

Unchecked exception for errors while invoking database operations. These exceptions are already logged and are only thrown so interested caller can handle exceptions

DatabaseException()

Parameters:

undocumented

EntityCache

A loading cache for entities and descriptors. This cache is intended to be used for caching entities that are used very often (like unit groups or flow properties) and descriptors.

create() : EntityCache

Parameters:

undocumented

get() : T

Parameters:

undocumented

getAll() : Map<Long, T>

Parameters:

undocumented

invalidate() : void

Parameters:

undocumented

invalidateAll() : void

undocumented

invalidateAll() : void

Parameters:

undocumented

refresh() : void

Parameters:

undocumented

FileStore

Provides structured access to files that are stored outside of a database. Such files can be shapefiles of LCIA methods, PDF documents of sources etc.

FileStore()

Parameters:

undocumented

FileStore()

Parameters:

undocumented

copyFolder() : void

Parameters:

undocumented

copyFolder() : void

Parameters:

undocumented

copyFolder() : void

Parameters:

undocumented

deleteFolder() : void

Parameters:

undocumented

deleteFolder() : void

Parameters:

undocumented

deleteFolder() : void

Parameters:

undocumented

getFolder() : File

Parameters:

undocumented

getFolder() : File

Parameters:

undocumented

getFolder() : File

Parameters:

undocumented

getPath() : String

Parameters:

Returns the path/folder name for the given model type (e.g. ‘processes’, ‘flow_properties’ etc).

getPath() : String

Parameters:

undocumented

getRoot() : File

undocumented

IDatabase > Closeable, INotifiable

The common interface for openLCA databases.

createConnection() : Connection

Creates a native SQL connection to the underlying database. The connection should be closed from the respective client.

getEntityFactory() : EntityManagerFactory

Returns the entity manager factory from the database.

getFileStorageLocation() : File

Get a location where external files that belongs this database are stored (e.g. PDF or Word documents, shapefiles etc). If there is no such location for such files for this database, an implementation can just return null.

getName() : String

Returns the database name.

getVersion() : int

undocumented

ImpactMethodDao > CategorizedEntityDao

The DAO class for impact assessment methods.

ImpactMethodDao()

Parameters:

undocumented

getCategoryDescriptors() : List<ImpactCategoryDescriptor>

Parameters:

undocumented

getCategoryDescriptors() : List<ImpactCategoryDescriptor>

Parameters:

undocumented

getNwSetDescriptors() : List<NwSetDescriptor>

Parameters:

undocumented

getNwSetDescriptors() : List<NwSetDescriptor>

Parameters:

undocumented

Query

A helper class for common queries.

getAll() : List<T>

Parameters:

undocumented

getAll() : List<T>

Parameters:

undocumented

getAllForName() : List<T>

Parameters:

undocumented

getFirst() : T

Parameters:

undocumented

getForName() : T

Parameters:

Searches an entity of the given type with the given name. The type must have a string field ‘name’. If no such type is contained in the database, null is returned.

on() : Query

Parameters:

undocumented

Package: org.openlca.core.database.derby

Package: org.openlca.core.database.mysql

DatabaseDescriptor

The descriptor of a database.

getName() : String

undocumented

getVersion() : int

undocumented

isUpToDate() : boolean

undocumented

setName() : void

Parameters:

undocumented

setUpToDate() : void

Parameters:

undocumented

setVersion() : void

Parameters:

undocumented

MySQLDatabase > Notifiable, IDatabase

IDatabase implementation for MySQL database. The URL schema is “jdbc:mysql://” [host] “:” [port] “/” [database]

MySQLDatabase()

Parameters:

undocumented

MySQLDatabase()

Parameters:

undocumented

close() : void

Overridden method of supertype.

createConnection() : Connection

Overridden method of supertype.

getEntityFactory() : EntityManagerFactory

Overridden method of supertype.

getFileStorageLocation() : File

Overridden method of supertype.

getName() : String

Overridden method of supertype.

getVersion() : int

Overridden method of supertype.

setFileStorageLocation() : void

Parameters:

undocumented

Package: org.openlca.core.database.references

IReferenceSearch

Search of used entities within an entity.

FACTORY : Factory

undocumented

findReferences() : List<Reference>

undocumented

findReferences() : List<Reference>

Parameters:

Returns a list of descriptors of entities that are used in the entity with the given id

findReferences() : List<Reference>

Parameters:

undocumented

findReferences() : List<Reference>

Parameters:

undocumented

findReferences() : List<Reference>

Parameters:

undocumented

Package: org.openlca.core.database.usage

ActorUseSearch > BaseUseSearch

Searches for the use of actors in other entities. Actors can be used in processes and projects.

ActorUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

CategoryUseSearch > BaseUseSearch

Searches for the use of currencies in other entities. Currencies can be used in processes.

CategoryUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

CurrencyUseSearch > BaseUseSearch

Searches for the use of currencies in other entities. Currencies can be used in processes and other currencies.

CurrencyUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

DQSystemUseSearch > BaseUseSearch

Searches for the use of data quality systems in other entities. DQSystems can be used in processes.

DQSystemUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

ExchangeUseSearch

Searches for the use of process exchanges in other entities. Exchanges of a process can be used in product systems as quantitative reference or in process links.

ExchangeUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

FlowPropertyFactorUseSearch

Searches for the usage of flow property factors of a given flow in other entities of the database.

FlowPropertyFactorUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

FlowPropertyUseSearch > BaseUseSearch

Searches for the use of flow properties in other entities. Flow properties can be used in flows (in flow property factors) and unit groups (as default flow property).

FlowPropertyUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

FlowUseSearch > BaseUseSearch

Searches for the use of flows in other entities. Flows can be used in processes and impact methods.

FlowUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

IUseSearch

Search of entities where another entity is used.

FACTORY : Factory

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Returns a list of descriptors of entities where the given entity id is used.

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

ImpactMethodUseSearch > BaseUseSearch

Searches for the use of impact methods in other entities. Impact methods can be used in projects.

ImpactMethodUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

LocationUseSearch > BaseUseSearch

Searches for the use of locations in other entities. Locations can be used in flows and processes.

LocationUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

ParameterUsageTree

Calculates the usage tree for a parameter.

ParameterUsageTree()

Parameters:

undocumented

nodes : List

undocumented

param : String

undocumented

build() : ParameterUsageTree

Parameters:

undocumented

ParameterUseSearch > BaseUseSearch

Searches for the use of parameters in other entities.

ParameterUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

ProcessUseSearch > BaseUseSearch

Searches for the use of processes in other entities. Processes can be used in product systems.

ProcessUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

SocialIndicatorUseSearch > BaseUseSearch

Searches for the use of currencies in other entities. Currencies can be used in processes.

SocialIndicatorUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

SourceUseSearch > BaseUseSearch

Searches for the use of sources in other entities. Sources can be used in processes.

SourceUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

UnitGroupUseSearch > BaseUseSearch

Searches for the use of unit groups in other entities. Unit groups can be used in flow properties.

UnitGroupUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

Overridden method of supertype.

UnitUseSearch

Searches for the usage of flow property factors of a given flow in other entities of the database.

UnitUseSearch()

Parameters:

undocumented

findUses() : List<CategorizedDescriptor>

Parameters:

undocumented

Package: org.openlca.core.math

CalculationSetup

A setup for a product system calculation.

CalculationSetup()

Parameters:

Creates a new calculation setup for the given type and product system. It does not add the parameter redefinitions of the product system to this setup. Thus, you need to do this in a separate step.

allocationMethod : AllocationMethod

undocumented

impactMethod : ImpactMethodDescriptor

undocumented

numberOfRuns : int

Only valid for Monte Carlo Simulations

nwSet : NwSetDescriptor

undocumented

parameterRedefs : List

undocumented

productSystem : ProductSystem

undocumented

type : CalculationType

undocumented

withCosts : boolean

undocumented

getAmount() : double

undocumented

getFlowPropertyFactor() : FlowPropertyFactor

undocumented

getUnit() : Unit

Get the unit of the quantitative reference of the product system. By default this is the reference unit of the underlying product system.

setAmount() : void

Parameters:

Optionally set another target amount for the calculation than the one defined in the product system.

setFlowPropertyFactor() : void

Parameters:

Optionally set another flow property factor for the calculation than the one defined in the product system.

setUnit() : void

Parameters:

Optionally set another unit for the calculation than the one defined in the product system.

CalculationType

The type of a calculation.

SIMPLE_CALCULATION

Calculates the total results for elementary flows, LCIA indicators, costs, etc. of a product system.

CONTRIBUTION_ANALYSIS

Includes the total result vectors of a simple calculation but calculates also the direct contributions of each process (or better process product in case of multi-output processes) to these total results.

UPSTREAM_ANALYSIS

Extends the contribution analysis by providing also the upstream results of each process (process product) in the product system. The upstream result contains the direct contributions of the respective process but also the result of the supply chain up to this process scaled to the demand of the process in the product system.

REGIONALIZED_CALCULATION

A regionalized calculation is a contribution analysis but with an LCIA method that supports regionalized characterization factors (via region specific parameters in formulas) and a product system with processes that have geographic information assigned (point, line, or polygon shapes).

MONTE_CARLO_SIMULATION

A Monte Carlo simulation generates for each run, of a given number of a given number of iterations, random values according to the uncertainty distributions of process inputs/outputs, parameters, characterization factors, etc. of a product system and then performs a simple calculation for that specific run.

DataStructures

Provides helper methods for creating matrix-like data structures that can be used in calculations (but also exports, validations, etc.).

createProductIndex() : TechIndex

Parameters:

Creates a product index from the given product system.

interpreter() : FormulaInterpreter

Parameters:

undocumented

matrixData() : MatrixData

Parameters:

Create the matrix data for the calculation of the given setup.

parameterContexts() : Set<Long>

Parameters:

undocumented

LcaCalculator

This calculator does the low level matrix based LCA-calculation. Typically, you do not want to use this directly but a more high level calculator where you can directly throw in a calculation setup or project.

LcaCalculator()

Parameters:

undocumented

calculateContributions() : ContributionResult

undocumented

calculateFull() : FullResult

undocumented

calculateSimple() : SimpleResult

undocumented

getLoopFactor() : double

Parameters:

undocumented

getRealDemands() : double[]

Parameters:

Calculate the real demand vector for the analysis.

getScalingVector() : double[]

Parameters:

Calculates the scaling vector for the reference product i from the given inverse of the technology matrix:

s = d[i] .* Inverse[:, i]

where d is the demand vector and.

getTotalRequirements() : double[]

Parameters:

Calculates the total requirements of the respective product amounts to fulfill the demand of the product system:

tr = s .* diag(A)

where s is the scaling vector and A the technology matrix.

MatrixRowSorter

Sorts a quadratic matrix (the technology matrix in openLCA) so that rows with more entries are located at the bottom of the matrix.

MatrixRowSorter()

Parameters:

undocumented

run() : IMatrix

undocumented

ReferenceAmount

Functions for getting the reference amount. The reference amount is the amount of a flow value converted to the reference unit and flow property of that flow. This is the value that is used in the calculations.

get() : double

Parameters:

Get the reference amount of the reference flow / quantitative reference of the given product system.

get() : double

Parameters:

Get the reference amount of the reference flow / quantitative reference of the given calculation setup.

get() : double

Parameters:

Get the reference amount of the given exchange.

Simulator

A Simulator runs Monte-Carlo simulations with a given calculation setup.

When running the Monte Carlo simulation on a product system s_r that has a sub-system (which again can have sub-systems etc.) we need to first run the number generation and calculation for that sub-system and integrate these results into the matrices of s_r in each iteration step of the simulation. In general, we have to do this for each relation s_i \prec s_j, where s_i is a sub-system of s_j, of all product systems S of the recursively expanded sub-system dependencies.

S is a strict partial ordered set as we do not allow cycles in the sub-system dependencies. Thus, we can define a linear order of all systems via topological sorting which maps each product system s_i to a position pos_i with pos_i < pos_j when s_i \prec s_j.

In the simulation, we then run the number generation and calculation for each sub-system starting from the lowest position in pos = [1 \dots n] where the top-most product system s_r has the position pos_r = n. Thus, in a simulation step a product system s_j can access and integrate the result of a sub-system s_i when s_i \prec s_j. With this, the number generation and calculation have to be done only once for each simulation step for each product system s_i \in S.

pinnedProducts : Set

A set of products for which upstream and direct contributions should be tracked during the simulation. These products must be part of the TechIndex.

create() : Simulator

Parameters:

undocumented

getEnviIndex() : FlowIndex

undocumented

getImpactIndex() : DIndex<ImpactCategoryDescriptor>

undocumented

getResult() : SimulationResult

Get the result of the simulation.

getTechIndex() : TechIndex

undocumented

nextRun() : SimpleResult

Generates random numbers and calculates the product system. Returns the simulation result if the calculation in this run finished without errors, otherwise null is returned (e.g. when the resulting matrix was singular). The returned result is appended to the result of the simulator (which you get via getResult(), so it does not need to be cached.

SystemCalculator

Calculates the results of a calculation setup or project. The same calculator can be used for different setups. The product systems of the setups may contain sub-systems. The calculator does not check if there are obvious errors like sub-system cycles etc.

SystemCalculator()

Parameters:

undocumented

calculate() : ProjectResult

Parameters:

undocumented

calculateContributions() : ContributionResult

Parameters:

undocumented

calculateFull() : FullResult

Parameters:

undocumented

calculateSimple() : SimpleResult

Parameters:

undocumented

Package: org.openlca.core.math.data_quality

ProcessingType

Lists the different types of how to process n.a. values in data quality calculation

EXCLUDE

undocumented

USE_MAX

undocumented

Package: org.openlca.core.matrix

AllocationIndex

An instances of this class provides fast access to the allocation factors related to the products of a product system. It maps a product p and an exchange of flow i to the respective allocation factor \lambda_{p,i}:

Idx_{Alloc}: (p, i) \mapsto \lambda_{p,i}

create() : AllocationIndex

Parameters:

Creates a new allocation index for the given database, product index, and allocation method.

get() : double

Parameters:

Returns the allocation factor \lambda_{p,i} for the given product p and (ID of the exchange with the) flow i. It is very important that this method is only called with exchanges that can be allocated to a product output or waste input, which are: product inputs, waste outputs, or elementary flows.

CostVector

A cost vector contains the unscaled net-costs for a set of process-products. Unscaled means that these net-costs are related to the (allocated) product amount in the respective process. The vector is then scaled with the respective scaling factors in the result calculation.

asMatrix() : IMatrix

Parameters:

undocumented

DIndex

Maps a set of descriptors to an ordinal, zero-based index of type int. This class is used to map descriptors to matrix columns. Note that this implementation assumes that the descriptors describe existing objects in a database and thus have an ID > 0. Also, this class is not thread safe.

at() : D

Parameters:

Get the descriptor at the given position or null when there is no descriptor at the given position.

contains() : boolean

Parameters:

Returns true when the given descriptor is part of that index.

contains() : boolean

Parameters:

Returns true when the descriptor with the given ID is part of that index.

content() : Set<D>

Returns the content of this index.

each() : void

Parameters:

Calls the given function for each descriptor in this index.

idAt() : long

Parameters:

Get the ID of the descriptor at the given position.

ids() : long[]

Get the IDs of all descriptors that are in this index.

isEmpty() : boolean

Returns true if there is no content in this index.

of() : int

Parameters:

Returns the position of the given descriptor. If the descriptor is not in the index, it returns -1.

of() : int

Parameters:

Returns the position of the descriptor with the given ID. If the descriptor is not in the index, it returns -1.

put() : int

Parameters:

Adds the given descriptor to this index if it is not yet contained and returns the index position of it.

putAll() : void

Parameters:

Adds all descriptors from the given collection to this index.

size() : int

Returns the number of descriptors in the index.

FastMatrixBuilder

A fast matrix builder that skips the product system linking layer …

FastMatrixBuilder()

Parameters:

undocumented

build() : MatrixData

undocumented

FlowIndex > DIndex

The row index \mathit{Idx}_B of the intervention matrix \mathbf{B}. It maps the (elementary) flows \mathit{F} of the processes in the product system to the k rows of \mathbf{B}.

\mathit{Idx}_B: \mathit{F} \mapsto [0 \dots k-1]

build() : FlowIndex

Parameters:

undocumented

isInput() : boolean

Parameters:

undocumented

isInput() : boolean

Parameters:

undocumented

putInput() : int

Parameters:

undocumented

putOutput() : int

Parameters:

undocumented

ImpactFactorMatrix

A matrix with impact assessment factors where the flows are mapped to the columns and the impact categories are mapped to the rows. The factors should be negative in this matrix if the corresponding flow is an input flow.

ImpactFactorMatrix()

Parameters:

undocumented

apply() : void

Parameters:

undocumented

createRealMatrix() : IMatrix

Parameters:

undocumented

getEntry() : ImpactFactorCell

Parameters:

undocumented

isEmpty() : boolean

undocumented

setEntry() : void

Parameters:

undocumented

simulate() : void

Parameters:

undocumented

ImpactTable

The ImpactTable is the corresponding data type to the Inventory type but wraps a matrix of impact assessment factors.

factorMatrix : ImpactFactorMatrix

undocumented

flowIndex : FlowIndex

undocumented

impactIndex : DIndex

undocumented

build() : ImpactTable

Parameters:

undocumented

createMatrix() : IMatrix

Parameters:

undocumented

createMatrix() : IMatrix

Parameters:

undocumented

isEmpty() : boolean

undocumented

simulate() : void

Parameters:

Re-evaluates the parameters and formulas in the impact factor table (because they may changed), generates new values for the entries that have an uncertainty distribution and set these values to the entries of the given matrix. The given matrix and this impact table have to match exactly in size (so normally you first call createMatrix and than simulate).

IndexConsumer

Like the normal consumer function but with an index of the respective object as first argument.

accept() : void

Parameters:

undocumented

InventoryConfig

A class for configuration objects that are passed into an inventory builder.

InventoryConfig()

Parameters:

undocumented

allocationMethod : AllocationMethod

undocumented

db : IDatabase

undocumented

interpreter : FormulaInterpreter

undocumented

subResults : Map<ProcessProduct,SimpleResult>

Optional sub-system results of the product system.

techIndex : TechIndex

undocumented

withCosts : boolean

undocumented

withUncertainties : boolean

undocumented

LinkingCallback

A LinkingCallback is a function that can be injected into the creation of product systems links to control the linking process.

cancel() : boolean

Returns true if the linking process should be canceled.

select() : List<ProcessProduct>

Parameters:

This function is called when there are multiple possible providers for the given product input or waste output. The callback should select one or more providers from the given candidates. Returning null will lead to an undefined behavior. If exactly one provider is returned, the exchanges will be linked with this provider. When there are multiple providers returned, the linking process will select one option based on its own rules (e.g. this is what happens when the user selects continue with auto-select in the UI).

TODO: update doc

LongIndex

Maps arbitrary values of type long to an ordinal, zero-based index of type int. This class is used to map entity keys to matrix columns. The default value for a key that is not contained in this index is -1.

contains() : boolean

Parameters:

undocumented

getIndex() : int

Parameters:

Returns the index for the given key. Returns -1 if the key is not contained in the map.

getKeyAt() : long

Parameters:

undocumented

getKeys() : long[]

Get the keys of this index in their respective order in this index.

isEmpty() : boolean

undocumented

put() : int

Parameters:

Adds the given key to the index. The value for the key is the current size of the index.

size() : int

Returns the number of entries in the index.

LongPair > Comparable

A LongPair saves just a pair of longs. We use this typically to efficiently store the IDs of a process and a product or waste flow as pair that we then use in indices to build matrix structures for the calculation. In this case, the first value should be always the process ID and the second the flow ID.

LongPair()

Parameters:

undocumented

first : long

undocumented

second : long

undocumented

compareTo() : int

Parameters:

Overridden method of supertype.

equals() : boolean

Parameters:

undocumented

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

of() : LongPair

Parameters:

undocumented

toString() : String

Overridden method of supertype.

MatrixData

Contains the matrices of that are input of a calculation.

costVector : double[]

A cost vector contains the unscaled net-costs for a set of process-products. Unscaled means that these net-costs are related to the (allocated) product amount in the respective process. The vector is then scaled with the respective scaling factors in the result calculation. This vector is only available when LCC calculation should be done.

enviIndex : FlowIndex

The matrix index of the environmental/elementary flows (i.e. the row index of the intervention matrix; the column index of the impact matrix).

enviMatrix : IMatrix

The intervention matrix.

enviUncertainties : UMatrix

Contains the uncertainty distributions of the entries in the intervention matrix. This field is only used (not null) for uncertainty calculations.

impactIndex : DIndex

The matrix index of the LCIA categories (i.e. the row index of the impact matrix).

impactMatrix : IMatrix

The matrix with the characterization factors: LCIA categories * elementary flows.

techIndex : TechIndex

The matrix index of the product and waste flows of the technosphere (i.e. the row and column index of the technology matrix; the column index of the intervention matrix).

techMatrix : IMatrix

The technology matrix.

techUncertainties : UMatrix

Contains the uncertainty distributions of the entries in the technology matrix. This field is only used (not null) for uncertainty calculations.

simulate() : void

Parameters:

undocumented

NwSetTable

Stores the factors of a normalization and weighting set. As creating such a table is quite simple there is no separate builder class for reading this kind of data from a database but a factory method in this class.

applyBoth() : List<ImpactResult>

Parameters:

Applies the normalization and weighting factors to the given impact assessment result. Returns a normalized and weighted result for each result item in the given list. The given list is not modified.

applyNormalisation() : List<ImpactResult>

Parameters:

Applies the normalization factors to the given impact assessment result. Returns a normalized result for each result item in the given list. The given list is not modified.

applyWeighting() : List<ImpactResult>

Parameters:

Applies the weighting factors to the given impact assessment result. Returns a weighted result for each result item in the given list. The given list is not modified.

build() : NwSetTable

Parameters:

Builds the table by reading the factors for the NW-set with the given ID from the given database.

getNormalisationFactor() : double

Parameters:

Get the normalization factor for the given LCIA category.

getWeightingFactor() : double

Parameters:

Get the weighting factor for the given LCIA category.

hasNormalisationFactors() : boolean

undocumented

hasWeightingFactors() : boolean

undocumented

ParameterTable

A data structure for fast creation of formula interpreters for the parameters of a database.

forSimulation() : ParameterTable

Parameters:

Builds a parameter table suitable for creating formula interpreters in a Monte Carlo simulation.

interpreter() : FormulaInterpreter

Parameters:

Builds a formula interpreter for the global parameters and the local parameters of the given contexts (processes or LCIA methods). It also applies the given parameter redefinitions.

simulate() : FormulaInterpreter

Calculates new random values for the parameters in this table that have an uncertainty distribution assigned. It re-binds the values of theses parameters in the underlying interpreter with the generated values.

ProcessLinkSearchMap

This is a data structure for searching a set of existing process links by provider and recipient processes.

ProcessLinkSearchMap()

Parameters:

undocumented

Parameters:

Returns all incoming links to the process with the given ID, i.e. all links where the process is recipient.

Parameters:

Returns all the links where the process with the given ID is either provider or recipient.

Parameters:

Returns all the outgoing links from the process with the given ID, i.e. all links where the process is provider.

ProcessProduct

In openLCA, we map the process-product pairs of a product system to the respective rows and columns of the matrices in the inventory model. Multi-output processes are split into multiple vectors that each are relate to a single process-product pair. This also includes waste treatment processes (where the treatment of waste is the product) and product systems that are sub-systems of other product systems (and are handled like processes in these systems with their quantitative reference as product).

flow : FlowDescriptor

The product flow of the process-product pair. Note that this can also be a waste flow (which is then an input of the process and the treatment of waste is the product of the process).

process : CategorizedDescriptor

The process of process-product pair. Note that this can be also the descriptor of a product system when it is a sub-system of another product system because in this case such systems are handled just like processes (they are mapped to the technology matrix mathbf{A} via the TechIndex etc.).

equals() : boolean

Parameters:

Overridden method of supertype.

flowId() : long

undocumented

hashCode() : int

Overridden method of supertype.

id() : long

Returns the ID of the underlying process or product system of this provider.

locationId() : Long

undocumented

of() : ProcessProduct

Parameters:

undocumented

of() : ProcessProduct

Parameters:

undocumented

of() : ProcessProduct

Parameters:

Creates a product where the given product system is the provider and the reference flow of the system the product.

pair() : LongPair

undocumented

ProductSystemBuilder

Builds or auto-completes a product system according to a given configuration.

ProductSystemBuilder()

Parameters:

Create a new product system builder.

autoComplete() : void

Parameters:

Auto-completes the given product system starting with the reference process of the system and following all product inputs and waste outputs recursively to link them to a provider process. After this function the product system will contain an updated set of process IDs and process links. The meta-data of the product system are not changed. When you then want to save these updated process IDs and process links in the database you can call the {@link #saveLinks(ProductSystem)} function.

autoComplete() : void

Parameters:

Does the same as {@link #autoComplete(ProductSystem)} but starts the linking at the given process product which can be arbitrary product in the supply chain of the given system.

build() : ProductSystem

Parameters:

Creates a new product system for the given process and runs the auto-complete functions with the linking configuration of this build. The returned system is not saved to the database.

saveUpdates() : ProductSystem

Parameters:

Saves the updated process links and IDs of the given product system in the databases. Note that if the product system is already contained in the database (i.e. has an ID > 0) this function will not update the other meta-data of the system as it is intended to call this function after an {@link #autoComplete(ProductSystem)} call in this case.

TechIndex

The index \mathit{Idx}_A of the technology matrix \mathbf{A} of a product system. It maps the process-product pairs (or process-waste pairs) \mathit{P} of the product system to the respective n rows and columns of \mathbf{A}. If the product system contains other product systems as sub-systems, these systems are handled like processes and are also mapped as pair with their quantitative reference flow to that index (and also their processes etc.).

\mathit{Idx}_A: \mathit{P} \mapsto [0 \dots n-1]

TechIndex()

Parameters:

Creates a new technosphere index of a product system.

@param refFlow the reference product-output or waste-input as (processId, flowId) pair.

contains() : boolean

Parameters:

Returns true when there is a product in this index with a process and flow of the given IDs.

content() : Set<ProcessProduct>

Returns all providers of this index.

each() : void

Parameters:

undocumented

getDemand() : double

The demand value. This is the amount of the reference flow given in the reference unit and flow property. The default value is 1.0.

getIndex() : int

Parameters:

Returns the ordinal index of the given provider (product-output or waste input).

getLinkedExchanges() : Set<LongPair>

Returns all exchanges (product-inputs and waste-outputs) that are linked to provider of this index.

getLinkedProvider() : ProcessProduct

Parameters:

Returns the linked provider (product-output or waste-input) for the given exchange (product-input or waste-output)

getProcessIds() : Set<Long>

Returns the IDs of all processes in this index (note that this can also can contain product system IDs if there are sub-systems in the product system).

getProvider() : ProcessProduct

Parameters:

undocumented

getProviderAt() : ProcessProduct

Parameters:

Returns the provider (product-output or waste-input) at the given index.

getProviders() : List<ProcessProduct>

Parameters:

Get all providers with the given descriptor of a process or product system as entity.

getProviders() : List<ProcessProduct>

Parameters:

Returns the providers (product-outputs and waste-inputs) for the process with the given ID.

TODO: do we need this anymore?

getRefFlow() : ProcessProduct

Get the reference product-output or waste-input of the product system described by this index.

isLinked() : boolean

Parameters:

Returns true if the given product-input or waste-output is linked to a provider of this index.

isProvider() : boolean

Parameters:

Returns true when there is a process or product system with the given ID part of this index.

put() : void

Parameters:

Adds the given provider (product-output or waste-input) to this index. Does nothing if it is already contained in this index.

Parameters:

Adds a process link to this index.

@param exchange The linked product-input or waste-output as (processId, exchangeId) pair. @param provider The product-output or waste-input (provider) as (processId, flowId) pair.

setDemand() : void

Parameters:

The demand value. This is the amount of the reference flow given in the reference unit and flow property. The default value is 1.0.

size() : int

Returns the size of this index which is equal to the number of rows and columns in the related technology matrix.

UMatrix

An UMatrix is a matrix with uncertainty distributions.

UMatrix()

undocumented

add() : void

Parameters:

Add the given Exchange to the uncertainty matrix. It is only added when it has an uncertainty distribution or formulas assigned. Thus, you should call this function for every exchange when building the inventory matrices as this function will decide whether an exchange should be added.

generate() : void

Parameters:

Generates new values and sets them to the given matrix.

Package: org.openlca.core.matrix.cache

ConversionTable

A table that contains the conversion factors for units and flow property factors. (Note: A flow can have multiple flow properties and a flow property factor describes the flow specific conversion of a flow property to the reference flow property of a flow).

create() : ConversionTable

Parameters:

undocumented

getCurrencyFactor() : double

Parameters:

Get the conversion factor of the currency with the given ID to the reference currency in the database.

getPropertyFactor() : double

Parameters:

Get the conversion factor of the given flow property factor to the reference flow property factor of a flow.

getUnitFactor() : double

Parameters:

Get the conversion factor of the unit with the given ID to the reference unit of the unit group to which this unit belongs.

reload() : void

undocumented

FlowTable

A simple data structure that holds the flow types of the flows in a database.

create() : FlowTable

Parameters:

undocumented

get() : FlowDescriptor

Parameters:

undocumented

getFlowIds() : long[]

Get the IDs of all flows in this table.

getTypes() : TLongObjectHashMap<FlowType>

Parameters:

Get a map with all ID -> FlowType pairs from the database.

reload() : void

Parameters:

undocumented

type() : FlowType

Parameters:

undocumented

ProcessTable

TODO: tests + doc

create() : ProcessTable

Parameters:

undocumented

getProvider() : ProcessProduct

Parameters:

undocumented

getProviders() : List<ProcessProduct>

Parameters:

Returns the list of providers that have the flow with the given ID as product output or waste input.

getProviders() : List<ProcessProduct>

Get all product or waste treatment providers from the database.

getType() : ProcessType

Parameters:

Returns the process type for the given process-ID.

Package: org.openlca.core.matrix.format

CCRMatrix > IMatrix

Implements a compressed-column representation of a sparse matrix. Note that this format is not editable. Calling set(row, col, val) will throw an exception.

columnPointers : int[]

The column pointers A.c that indicate where each column begins. The last component of A.c contains \text{nnz}(A) where \text{nnz}(A) is the number of non-zero entries in A.

columns : int

The total number of columns.

rowIndices : int[]

The row indices A.r of the non-zero entries A.val.

rows : int

The total number of rows.

values : double[]

The vector with non-zero entries A.val.

columns() : int

Overridden method of supertype.

copy() : IMatrix

Overridden method of supertype.

get() : double

Parameters:

Overridden method of supertype.

getColumn() : double[]

Parameters:

Overridden method of supertype.

getRow() : double[]

Parameters:

Overridden method of supertype.

of() : CCRMatrix

Parameters:

undocumented

rows() : int

Overridden method of supertype.

set() : void

Parameters:

Overridden method of supertype.

setValues() : void

Parameters:

Overridden method of supertype.

DenseMatrix > IMatrix

An implementation that uses a double precision array to store the data. Data are stored in column-major order.

DenseMatrix()

Parameters:

undocumented

columns() : int

Overridden method of supertype.

copy() : DenseMatrix

Overridden method of supertype.

get() : double

Parameters:

Overridden method of supertype.

getColumn() : double[]

Parameters:

Overridden method of supertype.

getData() : double[]

undocumented

getRow() : double[]

Parameters:

Overridden method of supertype.

rows() : int

Overridden method of supertype.

set() : void

Parameters:

Overridden method of supertype.

HashPointMatrix > IMatrix

A sparse matrix implementation that uses primitive hash maps from the Trove project to store the data. Filling this matrix is fast with relatively low memory consumption.

Note that you have to make sure to set the respective row and column size when there are empty rows or columns.

HashPointMatrix()

undocumented

HashPointMatrix()

Parameters:

undocumented

HashPointMatrix()

Parameters:

undocumented

cols : int

undocumented

rows : int

undocumented

clear() : void

undocumented

columns() : int

Overridden method of supertype.

compress() : CompressedRowMatrix

undocumented

copy() : HashPointMatrix

Overridden method of supertype.

get() : double

Parameters:

Overridden method of supertype.

getColumn() : double[]

Parameters:

Overridden method of supertype.

getNumberOfEntries() : int

undocumented

getRow() : double[]

Parameters:

Overridden method of supertype.

iterate() : void

Parameters:

Iterates over the non-zero values in this matrix.

multiply() : double[]

Parameters:

Performs a matrix-vector multiplication with the given vector v.

rows() : int

Overridden method of supertype.

scaleColumns() : void

Parameters:

Scales each column j of the matrix with the value v[j] of the given vector: M * diagm(v). The matrix is modified in-place.

set() : void

Parameters:

Overridden method of supertype.

toString() : String

Overridden method of supertype.

IMatrix

Interface with the general matrix operations used in openLCA.

columns() : int

Returns the number of columns of the matrix.

copy() : IMatrix

Creates a copy of this matrix and returns it

get() : double

Parameters:

Get the value of the given row and column.

getColumn() : double[]

Parameters:

Get the row values of the given column.

getRow() : double[]

Parameters:

Get the column values of the given row.

rows() : int

Returns the number of rows of the matrix.

set() : void

Parameters:

Set the entry in the given row and column to the given value.

setValues() : void

Parameters:

undocumented

MatrixBuilder

This is matrix builder that allows you to create a matrix just by filling the values and which can switch efficiently between a sparse and dense representation during this filling process. It does this by allocation a growing dense matrix block and fast array copying if the fill rate exceeds a specific value. See https://github.com/msrocka/blockm for further information.

MatrixBuilder()

undocumented

MatrixBuilder()

Parameters:

undocumented

MatrixBuilder()

Parameters:

undocumented

add() : void

Parameters:

Let v be the current value at the cell $a_{row, col}. This function adds the given value w to $a_{row, col} so that:

a_{row, col} = v + w

Where v = 0 When there is no value at $a_{row, col}.

finish() : IMatrix

undocumented

minSize() : void

Parameters:

undocumented

set() : void

Parameters:

Set the cell (row, col) to the given value.

SparseMatrixData > Serializable

A class that holds the data of a sparse matrix. This class is only used for mapping the data between native and Java functions.

SparseMatrixData()

undocumented

SparseMatrixData()

Parameters:

Copies the data from the given matrix to a new instance of this class.

columnIndices : int[]

undocumented

columns : int

undocumented

numberOfEntries : int

undocumented

rowIndices : int[]

undocumented

rows : int

undocumented

values : double[]

undocumented

Package: org.openlca.core.matrix.io

CsvOut

This class provides methods for writing matrices and related indices to CSV files. It has the following properties:

write() : void

Parameters:

Write the given matrix data and indices as CSV files to the given folder.

write() : void

Parameters:

Write the result to the given folder.

write() : void

Parameters:

Write the matrix to the given file.

write() : void

Parameters:

Write the product index into the given file.

write() : void

Parameters:

Write the flow index into the given file.

write() : void

Parameters:

Write the LCIA category index into the given file.

writeCol() : void

Parameters:

Write the array as column vector to the given file.

MarketFormatWriter

Provides methods for writing matrices in the Matrix-Market format (see http://math.nist.gov/MatrixMarket/formats.html).

MarketFormatWriter()

Parameters:

undocumented

writeDense() : void

Writes the matrix in array format:
  1. file header
  2. [number of rows] [number of columns]
  3. each entry in a separate row in column-major order

See the Matrix-Market format specification for more details.

writeSparse() : void

Writes the matrix in coordinate format:
  1. file header
  2. [number of rows] [number of columns] [number of entries]
  3. entries in the form: [row index] [column index] [value]

See the Matrix-Market format specification for more details.

MatBinMatrixReader

Reads a binary Matlab file (version?) with a matrix with 64 bit floating point numbers into a IMatrix.

MatBinMatrixReader()

Parameters:

undocumented

read() : IMatrix

undocumented

setUseStreaming() : void

Parameters:

undocumented

Package: org.openlca.core.matrix.io.olcamat

EnviIndexEntry

Contains the meta-data of a row of the intervention matrix A.

flowCategory : String

undocumented

flowID : String

undocumented

flowLocation : String

undocumented

flowName : String

undocumented

flowPropertyID : String

undocumented

flowPropertyName : String

undocumented

flowType : FlowType

undocumented

index : int

undocumented

unitID : String

undocumented

unitName : String

undocumented

clone() : EnviIndexEntry

Overridden method of supertype.

Export > Runnable

Exports a matrix into the openLCA matrix (=olcamat) format.The olcamat format is still experimental so this may change in future.

Export()

Parameters:

undocumented

Export()

Parameters:

undocumented

withResults : boolean

undocumented

run() : void

Overridden method of supertype.

TechIndexEntry > EnviIndexEntry

Contains the meta-data of a row / column of the technology matrix A.

processCategory : String

undocumented

processID : String

undocumented

processLocation : String

undocumented

processName : String

undocumented

processType : ProcessType

undocumented

clone() : TechIndexEntry

Overridden method of supertype.

Package: org.openlca.core.matrix.product.index

ProviderSearch

Searches for the best provider for a given product input or waste output in the database.

ProviderSearch()

Parameters:

undocumented

find() : ProcessProduct

Parameters:

Find the best provider for the given product input or waste output according to the search settings.

getLinkCandidates() : List<CalcExchange>

Parameters:

Returns from the given list the product inputs or waste outputs that could be linked to a provider.

Package: org.openlca.core.matrix.solvers

DenseSolver > IMatrixSolver

A double precision solver that uses dense matrices and calls the respective

invert() : DenseMatrix

Parameters:

Overridden method of supertype.

matrix() : IMatrix

Parameters:

Overridden method of supertype.

multiply() : double[]

Parameters:

Overridden method of supertype.

multiply() : DenseMatrix

Parameters:

Overridden method of supertype.

scaleColumns() : void

Parameters:

Overridden method of supertype.

solve() : double[]

Parameters:

Overridden method of supertype.

IMatrixSolver

Interface for linear algebra and matrix problems that we need to solve in openLCA. We provide different implementations for these functions also in other packages which are based on high performance libraries like Eigen and OpenBLAS.

invert() : IMatrix

Parameters:

Calculates the inverse of the given matrix.

matrix() : IMatrix

Parameters:

Creates an instance of the default matrix type that can be used with this solver.

matrix() : IMatrix

Parameters:

Creates a instance of a matrix type which may dependent on the given density of the matrix (which is the number of non-zero elements divided by the total number of elements. By default it just calls the {@link IMatrixSolver#matrix(int, int)} method but this can be overwritten when the solver supports dense and sparse matrix implementations.

multiply() : IMatrix

Parameters:

Returns the matrix product of the given matrices.

multiply() : double[]

Parameters:

Calculates a matrix-vector product. In openLCA we use this for example when we calculate the inventory result: g = B * s

scaleColumns() : void

Parameters:

Scales the columns of matrix m with the factors in v. This is equivalent to m * diag(v) but can be implemented in a more efficient way.

solve() : double[]

Parameters:

Solves the system of linear equations A * s = d. In openLCA this is used to calculate the scaling factors of an inventory where the vector d has just a single entry.

@param a the technology matrix A @param d the demand value (the entry in the vector d).

@param idx the index of the entry in the demand vector.

@return the calculated scaling vector s

Package: org.openlca.core.model

AbstractEntity

This is an abstract class for everything that is identified by an ID and can be stored in a database via JPA. Generally, the generation of the ID should be managed by JPA.

This class provides implementations for hashCode and equals that are based on the ID field.

id : long

undocumented

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

toString() : String

Overridden method of supertype.

Actor > CategorizedEntity

An actor can be a person or an organisation.

address : String

undocumented

city : String

undocumented

country : String

undocumented

email : String

undocumented

telefax : String

undocumented

telephone : String

undocumented

website : String

undocumented

zipCode : String

undocumented

clone() : Actor

Overridden method of supertype.

AllocationFactor > AbstractEntity, Cloneable

This type describes an allocation factor related to a product or waste flow of a multi-functional process. A multi-functional process has, in contrast to a mono-functional process, multiple product outputs, waste inputs, or both. Allocation factors can be used to transform a multi-functional process into a set of mono-functional processes (or more precisely into a set of mono-functional process vectors). This is done by splitting the amount m_{i,u} of each product input, waste output, or elementary flow i of the multi-functional process u into a value m_{i,j} for each product output or waste input j by applying an allocation factor \lambda_{j} respectively:

m_{i,j} = \lambda_{j} \ m_{i,u}

In openLCA, allocation factors for different allocation methods (physical, economic, causal allocation) can be stored for a process. While physical and economic allocation factors of a product j are the same for all product inputs, waste outputs, or elementary flows i, they can be different for each flow i in case of causal allocation (so \lambda_{i,j} in this case).

Furthermore, the value of an allocation factor is between 0 and 1, and the sum off all allocation factors related to each product j (and flow i in case of causal allocation) is 1:

0 \leq \lambda_{(i,)j} \leq 1 \ \text{and} \ \sum_j{\lambda_{(i,)j}} = 1

exchange : Exchange

If the factor is a causal allocation factor this field contains a reference to the exchange with flow i to which the allocation factor is related. Note that there can be multiple exchanges with the same flow i and different allocation factors.

method : AllocationMethod

The allocation method to which the factor is related (physical, economic, or causal).

productId : long

The ID of the product flow j to which this allocation factor is related. In case of waste treatment processes (processes with waste inputs) this can be also the ID of a waste flow.

value : double

The value of the allocation factor \lambda_{j} (or \lambda_{i,j} in case of causal allocation).

clone() : AllocationFactor

Overridden method of supertype.

AllocationMethod

An enumeration of the allocation methods that can be used in processes and calculation setups.

USE_DEFAULT

This is a flag, that is used for calculations only. It means that the respective default allocation method of a process should be used when building a product system. Note, that this is not a valid value for the default allocation method in a process.

CAUSAL

Causal allocation means that the user can define an allocation factor for each input or output separately per output product of a process.

ECONOMIC

Means that an economic flow property is used to calculate the allocation factors of a process.

NONE

Means that no allocation method should be used.

PHYSICAL

Means that a physical flow property is used to calculate the allocation factors of a process.

Callback

A simple callback interface for notification of model events; e.g. for imports and exports.

apply() : void

Parameters:

Executes the callback function. This function follows the error-first pattern as known from Node.js but with a message object except of plain error.

CategorizedEntity > RootEntity

A categorized entity is a root entity with a category.

category : Category

undocumented

Exchange > AbstractEntity

Exchanges are representing the inputs and outputs of flows in processes.

amount : double

The amount of the exchange.

amountFormula : String

An optional formula for the exchange amount. The evaluated value of this formula should be always stored in the amount field.

baseUncertainty : Double

An optional base uncertainty of the data quality entry (= Pedigree matrix entry).

costFormula : String

undocumented

costs : Double

undocumented

currency : Currency

undocumented

defaultProviderId : long

If the exchange is an product input or waste output this field can contain a process ID which produces the respective product or treats the waste flow. This field is used when processes are automatically linked in product system graphs. A value of zero means that no link is set.

description : String

undocumented

dqEntry : String

The base uncertainty of the data quality entry (= Pedigree matrix entry).

flow : Flow

The flow of the exchange.

flowPropertyFactor : FlowPropertyFactor

The flow property (quantity) in which the amount of the exchange is given. It is a “flow property factor” because it contains also the conversion factor to the reference quantity of the flow.

internalId : int

An id that is unique within the process, this id must not be changed after creation

isAvoided : boolean

Indicates whether an exchange is an avoided product or waste flow. An exchange with an avoided product flow must be set as an input and an avoided waste flow as an output in order to be handled correctly in the calculation.

isInput : boolean

Indicates whether the exchange is an input (= true) or output (= false).

uncertainty : Uncertainty

An optional uncertainty distribution of the exchange amount.

unit : Unit

The unit in which the exchange amount is given.

clone() : Exchange

Overridden method of supertype.

from() : Exchange

Parameters:

undocumented

from() : Exchange

Parameters:

undocumented

toString() : String

Overridden method of supertype.

FlowProperty > CategorizedEntity

Flow properties are quantities like mass, volume, etc.

flowPropertyType : FlowPropertyType

undocumented

unitGroup : UnitGroup

undocumented

clone() : FlowProperty

Overridden method of supertype.

FlowPropertyFactor > AbstractEntity

A conversion factor between two quantities of a flow.

conversionFactor : double

undocumented

flowProperty : FlowProperty

undocumented

clone() : FlowPropertyFactor

Overridden method of supertype.

FlowType

Enumeration of available flow types

ELEMENTARY_FLOW

undocumented

PRODUCT_FLOW

undocumented

WASTE_FLOW

undocumented

MappingFile > AbstractEntity

A mapping file is used to store mappings of entities from other data formats (like ILCD, EcoSpold etc.) to openLCA entities or the other way around. See the olca-io module for the use of such mapping files in imports and exports. We just store the name of the file as string and its content as BLOB (which normally contains the compressed content).

content : byte[]

undocumented

fileName : String

undocumented

ModelType

Enumeration of the basic types in the openLCA domain model.

UNKNOWN

undocumented

PROJECT

undocumented

IMPACT_METHOD

undocumented

IMPACT_CATEGORY

undocumented

PRODUCT_SYSTEM

undocumented

PROCESS

undocumented

FLOW

undocumented

FLOW_PROPERTY

undocumented

UNIT_GROUP

undocumented

UNIT

undocumented

ACTOR

undocumented

SOURCE

undocumented

CATEGORY

undocumented

LOCATION

undocumented

NW_SET

undocumented

SOCIAL_INDICATOR

undocumented

CURRENCY

undocumented

PARAMETER

undocumented

DQ_SYSTEM

undocumented

categorized() : ModelType[]

undocumented

forModelClass() : ModelType

Parameters:

undocumented

getModelClass() : Class<? extends RootEntity>

undocumented

isCategorized() : boolean

undocumented

isOneOf() : boolean

Parameters:

undocumented

NwSet > RootEntity

Normalization and weighting set.

factors : List

undocumented

weightedScoreUnit : String

undocumented

clone() : NwSet

Overridden method of supertype.

getFactor() : NwFactor

Parameters:

undocumented

Parameter > CategorizedEntity

In openLCA, parameters can be defined in different scopes: global, process, or LCIA method. The parameter name can be used in formulas and, thus, need to conform to a specific syntax. Within a scope the parameter name should be unique (otherwise the evaluation is not deterministic). There are two types of parameters in openLCA: input parameters and dependent parameters. An input parameter can have an optional uncertainty distribution but not a formula. A dependent parameter can (should) have a formula (where also other parameters can be used) but no uncertainty distribution.

externalSource : String

A reference to an external source of the parameter (e.g. a shape file in a regionalized LCIA method).

formula : String

The formula of the parameter (only valid for dependent parameters).

isInputParameter : boolean

Indicates whether the parameter is an input parameter.

scope : ParameterScope

The scope of the parameter (global, process, LCIA method).

sourceType : String

If the parameter has an external source the type of this source can be specified in this field.

uncertainty : Uncertainty

The uncertainty distribution of the parameter value (only valid for input parameters).

value : double

The value of the parameter.

clone() : Parameter

Overridden method of supertype.

isValidName() : boolean

Parameters:

Returns true if the given name is a valid identifier for a parameter. We allow the same rules as for Java identifiers.

toString() : String

Overridden method of supertype.

ParameterRedef > AbstractEntity

A redefinition of a parameter in a project or product systems. The redefinition defines a context for the redefinition which is the process or LCIA method for which the redefinition is valid. If there is no such context given it is a redefinition of a global parameter.

contextId : Long

The ID of the process or LCIA method for which the redefinition is valid. If the context ID is null it is a redefinition of a global parameter.

contextType : ModelType

The type of the context where the original parameter is defined (currently only processes or LCIA methods are possible). For global parameter redefinitions the context type is null.

name : String

The name of the parameter that should be redefined.

uncertainty : Uncertainty

undocumented

value : double

undocumented

clone() : ParameterRedef

Overridden method of supertype.

ParameterScope

Parameters can be defined globally, in processes, or LCIA methods. They can be redefined in calculation setups on the project and product system level, but the initial definition is always only global, in processes, or LCIA methods.

PROCESS

undocumented

IMPACT_METHOD

undocumented

GLOBAL

undocumented

ProcessDocumentation > AbstractEntity, Cloneable

Contains the general documentation fields of a process that are not used for indexing, calculation, etc.

completeness : String

undocumented

undocumented

creationDate : Date

undocumented

dataCollectionPeriod : String

undocumented

dataDocumentor : Actor

undocumented

dataGenerator : Actor

undocumented

dataSelection : String

undocumented

dataSetOwner : Actor

undocumented

dataTreatment : String

undocumented

geography : String

undocumented

intendedApplication : String

undocumented

inventoryMethod : String

undocumented

modelingConstants : String

undocumented

precedingDataSet : String

undocumented

project : String

undocumented

publication : Source

undocumented

restrictions : String

undocumented

reviewDetails : String

undocumented

reviewer : Actor

undocumented

sampling : String

undocumented

sources : List

undocumented

technology : String

undocumented

time : String

undocumented

validFrom : Date

undocumented

validUntil : Date

undocumented

clone() : ProcessDocumentation

Overridden method of supertype.

ProcessGroup > Comparable

A group of process IDs with a name. The lower case name of the group is used as identifier for the equals, hash-code, and compare-functions.

name : String

undocumented

processIds : List

undocumented

compareTo() : int

Parameters:

Overridden method of supertype.

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

ProcessGroupSet > AbstractEntity

A set of process groups that can be stored in the database. The groups are stored in a binary format:

gzip(number_of_groups:n*n)

name : String

undocumented

getGroups() : List<ProcessGroup>

Get the process groups from the internal byte array presentation.

setGroups() : void

Parameters:

Sets the groups of this set by converting it to an internal byte array presentation.

A process link is a connection between a provider (which can be a process or product system) and a process in a product system.

exchangeId : long

ID of the product input or waste output that is linked to a provider.

flowId : long

ID of the flow that is an output of the one process and an input of the of the other process.

When true, the provider of this link is a product system.

processId : long

ID of the process that has a link to the provider (has a product input or waste output).

providerId : long

ID of the process or product system that is an provider of a product (has a product output) or a waste treatment (has a waste input). The pair (providerId, flowId) is used to index the matrices in the calculation.

Overridden method of supertype.

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

RootEntity > AbstractEntity, Cloneable

A root entity is a stand alone entity in the application. It should have a name, description, and an UUID (reference ID). A root entity can contain other root entities via aggregation but the life cycle of the contained entities is then not coupled to the life cycle of the respective container (no cascade delete etc.). On the other side, the life cycle of non-root entities contained in root entities is coupled to the life cycle of the container.

Root entities must provide an implementation of clone with flat copies for contained root-entities and deep copies for contained non-root entities.

description : String

undocumented

lastChange : long

undocumented

name : String

undocumented

refId : String

undocumented

version : long

undocumented

clone() : Object

undocumented

toString() : String

Overridden method of supertype.

Uncertainty

Represents the uncertainty distributions supported by openLCA. Three fields are reserved for distribution parameters. See the documentation of the respective fields to see which distribution parameters are stored in which fields for the respective distribution types. Each distribution parameter can take a value and additionally a formula.

distributionType : UncertaintyType

undocumented

formula1 : String

A formula for the first distribution parameter {@link #parameter1}.

formula2 : String

A formula for the second distribution parameter {@link #parameter2}.

formula3 : String

A formula for the third distribution parameter {@link #parameter3}.

parameter1 : Double

The first parameter of the uncertainty distribution:

parameter2 : Double

The second parameter of the uncertainty distribution:

parameter3 : Double

The third parameter of the uncertainty distribution:

clone() : Uncertainty

Overridden method of supertype.

equals() : boolean

Parameters:

Overridden method of supertype.

fromString() : Uncertainty

Parameters:

undocumented

generator() : NumberGenerator

Creates a number generator of this uncertainty distribution.

hashCode() : int

Overridden method of supertype.

logNormal() : Uncertainty

Parameters:

Creates a log-normal distribution.

@param gmean the geometric mean. @param gsd the geometric standard deviation

none() : Uncertainty

Parameters:

Creates default distribution with type set to NONE and the first parameter set with the given mean value.

normal() : Uncertainty

Parameters:

Creates a normal distribution.

@param mean the arithmetic mean. @param sd the arithmetic standard deviation.

scale() : void

Parameters:

Scales the distribution parameters by the given factor. This multiplies every distribution parameter with the given factor. Except for the geometric standard deviation in log-normal distributions as this parameter is scale independent.

string() : String

Parameters:

A null-save method for getting the string representation of an uncertainty distribution.

toString() : String

Overridden method of supertype.

triangle() : Uncertainty

Parameters:

Creates a triangle distribution.

@param min The minimum value. @param mode The most likely value (the mode). @param max The maximum value.

uniform() : Uncertainty

Parameters:

Creates a uniform distribution.

@param min the minimum. @param max the maximum.

UnitGroup > CategorizedEntity

A set of {@link Unit} objects which are directly convertible into each other (e.g. units of mass: kg, g, mg…). A unit set has a reference unit with the conversion factor 1.0. The respective conversion factor of the other units is defined by the equation: f = [uRef] / [u] (with f: the conversion factor of the respective unit, [uRef] the equivalent amount in the reference unit, [u] the equivalent amount in the respective unit; e.g. f(kg) = 1.0 -> f(g) = 0.001).

defaultFlowProperty : FlowProperty

undocumented

referenceUnit : Unit

undocumented

units : List

undocumented

clone() : UnitGroup

Overridden method of supertype.

getUnit() : Unit

Parameters:

Returns the unit with the specified name or synonym from this group.

Version

A helper class for handling versions of root entities in openLCA. We support the following version scheme major.minor.update but store the parts of the version number in a single field. This makes the version number easy to compare, automatically increment (the update part), and can be converted to the ILCD and ecoinvent version schemes.

For each version field we allow a value between 0 and 32767 so the minimum version number is 0.0.0 and the maximum number 32767.32767.32767. The exact data type for a version field would be a 2-byte positive integer (short). However, we use integers in the public methods of this class to avoid casting.

Version()

undocumented

Version()

Parameters:

undocumented

Version()

Parameters:

undocumented

asString() : String

Parameters:

undocumented

equals() : boolean

Parameters:

Overridden method of supertype.

fromString() : Version

Parameters:

Returns the version from the given string. The string can be an ILCD compatible version string with 3 parts (major.minor.update, e.g. 01.01.000) where the two last parts and leading zeros are optional. Thus valid version strings are for example: 1, 1.1, 01.01.001, 44.1.96

getMajor() : int

undocumented

getMinor() : int

undocumented

getUpdate() : int

undocumented

getValue() : long

undocumented

hashCode() : int

Overridden method of supertype.

incMajor() : void

Parameters:

undocumented

incMajor() : void

Increments the major part of the version which resets the minor and update part to 0.

incMinor() : void

Parameters:

undocumented

incMinor() : void

Increments the minor part of the version which resets the update part to 0.

incUpdate() : void

Parameters:

undocumented

incUpdate() : void

Increments the update part of the version. Normally this is automatically done by the persistence unit.

setMajor() : void

Parameters:

undocumented

setMinor() : void

Parameters:

undocumented

setUpdate() : void

Parameters:

undocumented

toString() : String

Converts the version to an ILCD compatible version string with 3 parts: major.minor.update.

valueOf() : long

Parameters:

undocumented

Package: org.openlca.core.model.descriptors

BaseDescriptor

Descriptors are lightweight models containing only descriptive information of a corresponding entity.The intention of descriptors is to get these information fast from the database without loading the complete model. Therefore, the respective DAO classes should provide these.

description : String

undocumented

id : long

undocumented

lastChange : long

undocumented

name : String

undocumented

refId : String

undocumented

type : ModelType

undocumented

version : long

undocumented

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

toString() : String

Overridden method of supertype.

ImpactCategoryDescriptor > BaseDescriptor

The descriptor class for impact assessment categories.

ImpactCategoryDescriptor()

undocumented

referenceUnit : String

undocumented

ImpactMethodDescriptor > CategorizedDescriptor

The descriptor class for impact assessment methods.

ImpactMethodDescriptor()

undocumented

Package: org.openlca.core.results

BaseResult > IResult

BaseResult is a common (abstract) super class of different result implementations. It mainly contains the indices that map objects from the database to the rows and columns of the result matrices.

flowIndex : FlowIndex

The row index \mathit{Idx}_B of the intervention matrix \mathbf{B}. It maps the (elementary) flows \mathit{F} of the processes in the product system to the k rows of \mathbf{B}.

\mathit{Idx}_B: \mathit{F} \mapsto [0 \dots k-1]

impactIndex : DIndex

The row index \mathit{Idx}_C of the matrix with the characterization factors \mathbf{C}. It maps the LCIA categories \mathit{C} to the l rows of \mathbf{C}.

\mathit{Idx}_C: \mathit{C} \mapsto [0 \dots l-1]

techIndex : TechIndex

The index \mathit{Idx}_A of the technology matrix \mathbf{A}. It maps the process-product pairs (or process-waste pairs) \mathit{P} of the product system to the respective n rows and columns of \mathbf{A}. If the product system contains other product systems as sub-systems, these systems are handled like processes and are also mapped as pair with their quantitative reference flow to that index (and also their processes etc.).

\mathit{Idx}_A: \mathit{P} \mapsto [0 \dots n-1]

getFlows() : Set<FlowDescriptor>

Overridden method of supertype.

getImpacts() : Set<ImpactCategoryDescriptor>

Overridden method of supertype.

getProcesses() : Set<CategorizedDescriptor>

Overridden method of supertype.

getProviders() : Set<ProcessProduct>

Get the process-product pairs (or process-waste pairs) \mathit{P} of the product system. If the product system contains other product systems as sub-systems, these systems are handled like processes and are also included as pairs with their quantitative reference flow.

hasFlowResults() : boolean

Overridden method of supertype.

hasImpactResults() : boolean

Overridden method of supertype.

isInput() : boolean

Parameters:

Overridden method of supertype.

ContributionResult > SimpleResult

The ContributionResult extends the SimpleResult type. It also contains all direct contributions of the processes to the LCI and LCIA results. Additionally, it contains the contributions of the (elementary) flows to the LCIA results.

directCostResults : double[]

Contains the direct contributions \mathbf{k}_s of the process-product pairs to the total net-costs (\odot denotes element-wise multiplication):

\mathbf{k}_s = \mathbf{k} \odot \mathbf{s}

directFlowImpacts : IMatrix

A LCIA category * flow matrix that contains the direct contributions of the elementary flows to the LCIA result. This matrix can be calculated by column-wise scaling of the matrix with the characterization factors \mathbf{C} with the inventory result \mathbf{g}:

\mathbf{H} = \mathbf{C} \ \text{diag}(\mathbf{g})

directFlowResults : IMatrix

An elementary flow * process-product matrix that contains the direct contributions of the processes to the inventory result. This can be calculated by column-wise scaling of the intervention matrix \mathbf{B} with the scaling vector \mathbf{s}:

\mathbf{G} = \mathbf{B} \ \text{diag}(\mathbf{s})

directImpactResults : IMatrix

A LCIA category * process-product matrix that contains the direct contributions of the processes to the LCIA result. This can be calculated by a matrix-matrix multiplication of the direct inventory contributions \mathbf{G} with the matrix with the characterization factors \mathbf{C}:

\mathbf{H} = \mathbf{C} \ \mathbf{G}

impactFactors : IMatrix

A LCIA category * flow matrix \mathbf{C} the contains the characterization factors.

getDirectCostResult() : double

Parameters:

Get the direct contribution of the given process-product pair j to the LCC result: \mathbf{k}_s[j].

getDirectCostResult() : double

Parameters:

Get the direct contribution of the given process j to the LCC result. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getDirectFlowImpact() : double

Parameters:

Get the direct contribution of the given elementary flow to the LCIA result of the given LCIA category.

getDirectFlowResult() : double

Parameters:

Get the direct contribution of the given process-product pair j to the inventory result of elementary flow i: \mathbf{G}[i,j].

getDirectFlowResult() : double

Parameters:

Get the direct contribution of the given process j to the inventory result of elementary flow i. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getDirectImpactResult() : double

Parameters:

Get the direct contribution of the given process-product pair j to the LCIA category result j: \mathbf{D}[i,j].

getDirectImpactResult() : double

Parameters:

Get the direct contribution of the given process j to the LCIA category result i. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getFlowContributions() : List<FlowResult>

Parameters:

Get the direct contributions of the given process j to the inventory result of all elementary flows in the product system.

getFlowContributions() : List<FlowResult>

Parameters:

Get the contributions of all elementary flows to the given LCA category.

getImpactContributions() : List<ImpactResult>

Parameters:

Get the direct contributions of the given process j to the LCIA category results.

getProcessContributions() : ContributionSet<CategorizedDescriptor>

Parameters:

Get the direct contributions of the processes in the system to the inventory result of the given flow.

getProcessContributions() : ContributionSet<CategorizedDescriptor>

Parameters:

Get the direct contributions of the processes in the system to the LCIA result of the given LCIA category.

getProcessCostContributions() : ContributionSet<CategorizedDescriptor>

Get the direct contributions of all processes to the LCC result.

hasCostResults() : boolean

Overridden method of supertype.

ContributionSet

A set of contributions to an overall result.

ContributionSet()

Parameters:

undocumented

contributions : List<ContributionItem>

undocumented

empty() : ContributionSet<T>

undocumented

getContribution() : ContributionItem<T>

Parameters:

undocumented

FullResult > ContributionResult

The FullResult extends the ContributionResult. It contains additionally the upstream contributions to LCI, LCIA, and LCC results where applicable.

loopFactor : double

The loop factor c_r indicates whether the reference process of the product system is part of a product loop (c_r \neq 1 when this is the case). It can be calculated via:

c_r = \frac{\mathbf{s}[r] \mathbf{A}[r,r]}{\mathbf{f}[r]}

Where r is the index of the reference product of the system. Some upstream results have to be corrected by c_r when c_r \neq 1 to avoid double counting of these loop contributions.

techMatrix : IMatrix

The scaled technology matrix \mathbf{A*} of the product system. In this matrix each column j is scaled by the respective scaling factor \mathbf{s}_j:

\mathbf{A*} = \mathbf{A} \ \text{diag}(\mathbf{s})

upstreamCostResults : IMatrix

A row vector the upstream contributions to the LCC result of each process-product pair in the product system.

\mathbf{k}_u = (\mathbf{k} \ \mathbf{A}^{-1}) \ \text{diag}(c_r \ \mathbf{t})

When the reference process itself is located in a loop the total requirements need to be multiplied with the loop factor c_r to avoid double counting of the loop contributions (as they are contained in \mathbf{A}^{-1} and \mathbf{t}).

upstreamFlowResults : IMatrix

An elementary flow * process-product matrix that contains the upstream contributions (including the direct contributions) of the processes to the inventory result. It can be calculated by column-wise scaling of the result of the matrix-matrix multiplication of the intervention matrix \mathbf{B} with the inverse of the technology matrix \mathbf{A} by the total requirements \mathbf{t}:

\mathbf{U} = (\mathbf{B} \ \mathbf{A}^{-1}) \ \text{diag}(c_r \ \mathbf{t})

When the reference process itself is located in a loop the total requirements need to be multiplied with the loop factor c_r to avoid double counting of the loop contributions (as they are contained in \mathbf{A}^{-1} and \mathbf{t}).

upstreamImpactResults : IMatrix

A LCIA category * process-product matrix that contains the upstream contributions (including the direct contributions) of the processes to the LCIA result. It can be calculated by a matrix-matrix multiplication of the characterization factor matrix \mathbf{C} with the upstream results of the elementary flows \mathbf{U}:

\mathbf{V} = \mathbf{C} \ \mathbf{U}

getAddedValueTree() : UpstreamTree

Calculate the upstream tree for the LCC result as added value.

getCostTree() : UpstreamTree

Calculate the upstream tree for the LCC result as costs.

getLinkShare() : double

Parameters:

Get the contribution share of the outgoing process product (provider) to the product input (recipient) of the given link and the calculated product system. The returned share is a value between 0 and 1.

getTree() : UpstreamTree

Parameters:

Calculate the upstream tree for the given flow.

getTree() : UpstreamTree

Parameters:

Calculate the upstream tree for the given LCIA category.

getUpstreamCostResult() : double

Parameters:

Get the upstream contribution of the given process-product pair j to the LCC result: \mathbf{k}_u[j].

getUpstreamCostResult() : double

Parameters:

Get the upstream contribution of the given process j to the LCC result. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getUpstreamFlowResult() : double

Parameters:

Get the upstream contribution of the given process-product pair j to the inventory result of elementary flow i: \mathbf{U}[i,j].

getUpstreamFlowResult() : double

Parameters:

Get the upstream contribution of the given process j to the inventory result of elementary flow i. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getUpstreamFlowResults() : List<FlowResult>

Parameters:

Get the upstream contributions of the given process j to the inventory result of all elementary flows in the product system.

getUpstreamImpactResult() : double

Parameters:

Get the upstream contribution of the given process-product pair j to the LCIA category result j: \mathbf{V}[i,j].

getUpstreamImpactResult() : double

Parameters:

Get the upstream contribution of the given process j to the LCIA category result i. When the process has multiple products it is the sum of the contributions of all of these process-product pairs.

getUpstreamImpactResults() : List<ImpactResult>

Parameters:

Get the upstream contributions of the given process j to the LCIA category results.

GroupingContribution

Calculates the contributions of single process results grouped by a given grouping set.

GroupingContribution()

Parameters:

undocumented

calculate() : ContributionSet<ProcessGrouping>

Parameters:

Calculates contributions to an inventory flow.

calculate() : ContributionSet<ProcessGrouping>

Parameters:

Calculates contributions to an impact assessment method.

IResult

The common protocol of all result types.

getFlows() : Set<FlowDescriptor>

Get the (elementary) flows of the inventory model.

getImpacts() : Set<ImpactCategoryDescriptor>

Get the LCIA categories of the LCIA result.

getProcesses() : Set<CategorizedDescriptor>

Get the descriptors of the processes of the inventory model. If a product system contains other product systems, these sub-systems are also handled like processes and returned.

hasCostResults() : boolean

Returns true when this result contains LCC results.

hasFlowResults() : boolean

Returns true when this result contains (elementary) flow results.

hasImpactResults() : boolean

Returns true when this result contains LCIA results.

isInput() : boolean

Parameters:

Returns true when the given flow is handled as an input flow in the inventory model.

LocationContribution

Calculates the contributions of the single process results in an analysis result grouped by their locations.

LocationContribution()

Parameters:

undocumented

addedValues() : ContributionSet<Location>

Calculates added values aggregated by location.

calculate() : ContributionSet<Location>

Parameters:

Calculates contributions to an inventory flow.

calculate() : ContributionSet<Location>

Parameters:

Calculates contributions to an impact category.

netCosts() : ContributionSet<Location>

Calculates net-costs aggregated by location.

ProcessGrouping

A group of processes for result analysis. If this group is tagged as rest it contains all processes that are not assigned to other groups.

name : String

undocumented

processes : List

undocumented

rest : boolean

undocumented

applyOn() : List<ProcessGrouping>

Parameters:

Applies the given group set on the given processes. If there are processes not assignable to a group of the group set a group with these processes is created using the given parameter restName.

equals() : boolean

Parameters:

Overridden method of supertype.

hashCode() : int

Overridden method of supertype.

ProjectResult > IResult

A project result is a wrapper for the inventory results of the respective project variants.

addResult() : void

Parameters:

undocumented

getContributions() : ContributionSet<ProjectVariant>

Parameters:

undocumented

getContributions() : ContributionSet<ProjectVariant>

Parameters:

undocumented

getFlows() : Set<FlowDescriptor>

Overridden method of supertype.

getImpacts() : Set<ImpactCategoryDescriptor>

Overridden method of supertype.

getProcesses() : Set<CategorizedDescriptor>

Overridden method of supertype.

getResult() : ContributionResult

Parameters:

undocumented

getTotalFlowResult() : double

Parameters:

undocumented

getTotalFlowResults() : List<FlowResult>

Parameters:

undocumented

getTotalImpactResult() : double

Parameters:

undocumented

getVariants() : Set<ProjectVariant>

undocumented

hasCostResults() : boolean

Overridden method of supertype.

hasFlowResults() : boolean

Overridden method of supertype.

hasImpactResults() : boolean

Overridden method of supertype.

isInput() : boolean

Parameters:

Overridden method of supertype.

SimpleResult > BaseResult

The simplest kind of result of a calculated product system. This result type is particularly suitable for Monte Carlo simulations or other quick calculations.

scalingVector : double[]

The scaling vector \mathbf{s} which is calculated by solving the equation

\mathbf{A} \ \mathbf{s} = \mathbf{f}

where \mathbf{A} is the technology matrix and \mathbf{f} the final demand vector of the product system.

totalCosts : double

The total net-costs k_t of the LCC result:

k_t = \mathbf{k} \cdot \mathbf{s}

Where \mathbf{k}_j are the net-costs of process j and \mathbf{s}_j is the scaling factor of that process.

totalFlowResults : double[]

The inventory result \mathbf{g} of a product system:

\mathbf{g} = \mathbf{B} \ \mathbf{s}

Where \mathbf{B} is the intervention matrix and \mathbf{s} the scaling vector. Note that inputs have negative values in this vector.

totalImpactResults : double[]

The LCIA result \mathbf{h} of a product system:

\mathbf{h} = \mathbf{C} \ \mathbf{g}

Where \mathbf{C} is a flow * LCIA category matrix with the characterization factors and \mathbf{g} the inventory result.

totalRequirements : double[]

The total requirements of the products to fulfill the demand of the product system. As our technology matrix \mathbf{A} is indexed symmetrically (means rows and columns refer to the same process-product pair) our product amounts are on the diagonal of the technology matrix \mathbf{A} and the total requirements can be calculated by the following equation where \mathbf{s} is the scaling vector (\odot denotes element-wise multiplication):

\mathbf{t} = \text{diag}(\mathbf{A}) \odot \mathbf{s}

getScalingFactor() : double

Parameters:

Get the scaling factor \mathbf{s}_j of the given process-product pair j.

getScalingFactor() : double

Parameters:

Get the scaling factor \mathbf{s}_j of the given process j. When the process has multiple products in the system it returns the sum of the scaling factors of all of these process-product pairs.

getTotalFlowResult() : double

Parameters:

Get the total inventory result \mathbf{g}_i of the given flow i.

getTotalFlowResults() : List<FlowResult>

Returns the flow results of the inventory result \mathbf{g}.

getTotalImpactResult() : double

Parameters:

Returns the total LCIA result \mathbf{h}_i of the given LCIA category i.

getTotalImpactResults() : List<ImpactResult>

Returns the impact category results for the given result.

hasCostResults() : boolean

Overridden method of supertype.

SimulationResult > BaseResult

The results of a Monte-Carlo-Simulation. The single result values of the simulation runs are stored in an array of lists where the flow- and LCIA category indices are mapped to the respective array rows and the result values to the respective list entries.

SimulationResult()

Parameters:

undocumented

append() : void

Parameters:

Append the total LCI and LCIA result vectors of the given result to this simulation result.

append() : void

Parameters:

Append the given direct and upstream result of the pinned product to this result. We only append the respective vectors from the results. The indices of these vectors need to match with the indices of this result.

get() : double

Parameters:

Get the result of the given flow in the iteration i (zero based).

get() : double

Parameters:

Get the result of the given LCIA category in the iteration i (zero based).

getAll() : double[]

Parameters:

Get all simulation results of the given flow.

getAll() : double[]

Parameters:

Get all simulation results of the given LCIA category.

getAllDirect() : double[]

Parameters:

Get the direct contribution of the given product to the given flow for all iterations.

getAllDirect() : double[]

Parameters:

Get the direct contribution of the given product to the given LCIA category for all iterations.

getAllUpstream() : double[]

Parameters:

Get the upstream contribution of the given product to the given flow for all iterations.

getAllUpstream() : double[]

Parameters:

Get the upstream contribution of the given product to the given LCIA category for all iterations.

getDirect() : double

Parameters:

Get the direct contribution of the given product to the given flow in the iteration i (zero based).

getDirect() : double

Parameters:

Get the direct contribution of the given product to the given LCIA category in the iteration i (zero based).

getNumberOfRuns() : int

undocumented

getPinnedProducts() : Set<ProcessProduct>

undocumented

getUpstream() : double

Parameters:

Get the upstream contribution of the given product to the given flow in the iteration i (zero based).

getUpstream() : double

Parameters:

Get the upstream contribution of the given product to the given LCIA category in the iteration i (zero based).

hasCostResults() : boolean

Overridden method of supertype.

Statistics

Calculates statistic parameters for a set of numbers. This is mainly used for presenting results of a Monte-Carlo-Simulation.

count : int

undocumented

max : double

undocumented

mean : double

undocumented

median : double

undocumented

min : double

undocumented

range : double

undocumented

standardDeviation : double

undocumented

empty() : Statistics

undocumented

getPercentileValue() : double

Parameters:

Returns the value at the given percentile.

@param percentile the percentage value (0..100)

hist() : Histogram

Parameters:

Creates a histogram with associated statistics for the given data and number of intervals.

of() : Statistics

Parameters:

undocumented

UpstreamNode

Describes a node in an upstream tree.

provider : ProcessProduct

A process-flow pair which is a product output or waste input that describes a process in the upstream result tree.

result : double

The upstream result of this node.

UpstreamTree

Maps the upstream results of the product system graph to a tree where the root is the reference process of the product system.

UpstreamTree()

Parameters:

undocumented

UpstreamTree()

Parameters:

undocumented

ref : BaseDescriptor

An optional reference to a model (e.g. flow or LCIA category) to which the upstream tree is related.

root : UpstreamNode

undocumented

childs() : List<UpstreamNode>

Parameters:

undocumented

Package: org.openlca.eigen

NativeLibrary

A helper class for loading the native library from a file directory.

isLoaded() : boolean

undocumented

loadFromDir() : void

Parameters:

undocumented

Package: org.openlca.julia

Julia

Provides the Java interface for the native Julia libraries and contains some utility methods for loading these libraries.

invert() : int

Parameters:

Inverts the given matrix.

@param n [in] the dimension of the matrix (n = rows = columns) @param a [io] on entry: the matrix to be inverted, on exit: the inverse (size = n * n) @return the LAPACK return code

isLoaded() : boolean

Returns true if the Julia libraries with openLCA bindings are loaded.

isWithUmfpack() : boolean

undocumented

load() : boolean

Loads the libraries from a folder specified by the “OLCA_JULIA” environment variable.

loadFromDir() : boolean

Parameters:

Loads the Julia libraries and openLCA bindings from the given folder. Returns true if the libraries could be loaded (at least there should be a libjolca library in the folder that could be loaded).

mmult() : void

Parameters:

Matrix-matrix multiplication: C := A * B

@param rowsA [in] number of rows of matrix A @param colsB [in] number of columns of matrix B @param k [in] number of columns of matrix A and number of rows of matrix B @param a [in] matrix A (size = rowsAk) @param b [in] matrix B (size = k colsB) @param c [out] matrix C (size = rowsA * colsB)

mvmult() : void

Parameters:

Matrix-vector multiplication: y:= A * x

@param rowsA [in] rows of matrix A @param colsA [in] columns of matrix A @param a [in] the matrix A @param x [in] the vector x @param y [out] the resulting vector y

solve() : int

Parameters:

Solves a system of linear equations A * X = B for general matrices. It calls the LAPACK DGESV routine.

@param n [in] the dimension of the matrix A (n = rows = columns of A) @param nrhs [in] the number of columns of the matrix B @param a [io] on entry the matrix A, on exit the LU factorization of A (size = n * n) @param b [io] on entry the matrix B, on exit the solution of the equation (size = n * bColums) @return the LAPACK return code

umfDispose() : void

Parameters:

undocumented

umfFactorize() : long

Parameters:

undocumented

umfSolve() : void

Parameters:

undocumented

umfSolveFactorized() : long

Parameters:

undocumented

Package: org.openlca.util

Categories

Utility functions for openLCA categories.

createRefId() : String

Parameters:

undocumented

path() : List<String>

Parameters:

undocumented

Dirs

A simple utility class for directory operations.

clean() : void

Parameters:

Deletes the content from the given directory but not the directory itself.

copy() : void

Parameters:

Copies a directory recursively.

delete() : void

Parameters:

Deletes a directory recursively.

delete() : void

Parameters:

Deletes a directory recursively.

make() : void

Parameters:

Creates a directory if it not yet exists.

make() : void

Parameters:

Creates a directory if it not yet exists.

move() : void

Parameters:

Moves the given directory to the new location.

size() : long

Parameters:

Determines the size of the content of a directory recursively.

KeyGen

Generates a UUID version 3 for a given set of names.

Note that the generated key is case insensitive and that leading and trailing white-spaces are ignored.

NULL_UUID : String

undocumented

get() : String

Parameters:

undocumented

toPath() : String

Parameters:

undocumented

OS

Constants for some operating systems which are retrieved from the system property “os.name”.

LINUX

undocumented

MAC

undocumented

WINDOWS

undocumented

OTHER

undocumented

get() : OS

undocumented

getTempDir() : File

undocumented

toString() : String

Overridden method of supertype.

RefIdMap

In the imports and exports we often need a mapping of reference IDs to database internal IDs or the other way around. This class exactly provides such mappings by caching all IDs from the database.

get() : To

Parameters:

undocumented

internalToRef() : RefIdMap<Long, String>

Parameters:

undocumented

refToInternal() : RefIdMap<String, Long>

Parameters:

undocumented

Strings

Contains helper methods for string operations.

append() : String[]

Parameters:

undocumented

compare() : int

Parameters:

A null-save method for comparing two strings ignoring the case.

cut() : String

Parameters:

Cut a string to the given length. Appends “…” if the string was truncated.

join() : String

Parameters:

undocumented

join() : String

Parameters:

undocumented

notEmpty() : boolean

Parameters:

Returns true if the string is not null or empty, means that it contains other characters that white-spaces.

nullOrEmpty() : boolean

Parameters:

Returns true if the given string value is null or empty.

nullOrEqual() : boolean

Parameters:

Returns true if both of the given strings are null or if both of the given strings are equal.

prepend() : String[]

Parameters:

undocumented

readLines() : String[]

Parameters:

undocumented

TopoSort

An implementation of Kahn’s algorithm for topological sorting.

of() : List<Long>

Parameters:

Creates a topological order of the given relations. Each relation is encoded in a pair of IDs (first, second) where the (element with the) second ID depends on the (element with the) first ID. The IDs are returned in a list with increasing dependency order. As a topological order can be only created on relations that form an acyclic graph, the first element of the returned list has no dependencies. When there are cycles in the relations, this method returns null which means that a topological order cannot be created.