Search in sources :

Example 1 with LibraryDir

use of org.openlca.core.library.LibraryDir in project olca-modules by GreenDelta.

the class LibraryCalculatorExample method main.

public static void main(String[] args) throws Exception {
    var workspace = "C:/Users/Win10/openLCA-data-1.4";
    var db = new Derby(new File(workspace + "/databases/libre2"));
    var libDir = new LibraryDir(new File(workspace + "/libraries"));
    var system = db.get(ProductSystem.class, "6b32cda2-5aa4-44b9-b32a-c654da48436d");
    var setup = CalculationSetup.simple(system);
    var result = new SystemCalculator(db).calculateSimple(setup);
    var flow = result.enviIndex().at(0);
    System.out.println(flow.flow().name + " => " + result.getTotalFlowResult(flow));
    db.close();
}
Also used : Derby(org.openlca.core.database.Derby) File(java.io.File) SystemCalculator(org.openlca.core.math.SystemCalculator) LibraryDir(org.openlca.core.library.LibraryDir)

Aggregations

File (java.io.File)1 Derby (org.openlca.core.database.Derby)1 LibraryDir (org.openlca.core.library.LibraryDir)1 SystemCalculator (org.openlca.core.math.SystemCalculator)1