ODYM Classes
Created on Thu Mar 2 17:29:41 2017
@author: spauliuk
- class odym.ODYM_Classes.Classification(Name=None, ID=None, UUID=None, Dimension=None, Items=None, IDs=None, AdditionalProperties=None)
Class for aspect classification
- class odym.ODYM_Classes.Flow(Name=None, ID=None, UUID=None, P_Start=None, P_End=None, Indices=None, Values=None, Uncert=None, Unit=None, Color=None)
Class with the definition and methods for a flow in ODYM
- class odym.ODYM_Classes.MFAsystem(Name, Time_Start, Time_End, Geogr_Scope, Unit, IndexTable, Elements, ProcessList, FlowDict, StockDict, ParameterDict, Graphical=None, ID=None, UUID=None)
Class with the definition and methods for a system in ODYM
- Check_If_All_Chem_Elements_Are_present(FlowKey, AllElementsIndex)
This method is applicable to systems where the chemical element list contains both 0 (‘all’ chemical elements) and individual elements. It checks whether the sum of the system variable of the other elements equals the entry for element 0. This means that the breakdown of the system variable into individual elements has the same mass as the total for all elements. AllElementsindex is the position of the element 0 in the element list, typically, it is also 0.
- Consistency_Check()
Method that check a readily defined system for consistency of dimensions, Value setting, etc. See detailed comments.
- Flow_Sum_By_Element(FlowKey)
Reduce flow values to a Time x Elements matrix and return as t x e array. We take the indices of each flow, e.g., ‘t,O,D,G,m,e’, strip off the ‘,’ to get ‘tODGme’, add a ‘->’ and the index letters for time and element (here, t and e), and call the Einstein sum function np.einsum with the string ‘tODGme->te’, and apply it to the flow values.
- IndexTableCheck()
Check whether chosen classifications fit to dimensions of index table.
- Initialize_FlowValues()
This method will construct empty numpy arrays (zeros) for all flows where the value is None and wheree the indices are given.
- Initialize_ParameterValues()
This method will construct empty numpy arrays (zeros) for all parameters where the value is None and wheree the indices are given.
- Initialize_StockValues()
This method will construct empty numpy arrays (zeros) for all stocks where the value is None and wheree the indices are given.
- MassBalance(Element=None)
Determines mass balance of MFAsystem We take the indices of each flow, e.g., ‘t,O,D,G,m,e’, strip off the ‘,’ to get ‘tODGme’, add a ‘->’ and the index letters for time and element (here, t and e), and call the Einstein sum function np.einsum with the string ‘tODGme->te’, and apply it to the flow values. Sum to t and e is subtracted from process where flow is leaving from and added to destination process.
- SankeyExport(Year, Path, Element)
Exports MFAsystem to xls Template for the Circular Sankey method.
- Stock_Sum_By_Element(StockKey)
Reduce stock values to a Time x Elements matrix and return as t x e array. We take the indices of each stock, e.g., ‘t,c,G,m,e’, strip off the ‘,’ to get ‘tcGme’, add a ‘->’ and the index letters for time and element (here, t and e), and call the Einstein sum function np.einsum with the string ‘tcGme->te’, and apply it to the stock values.
- property Time_L
List of all model years
- property Time_V
Array of all model years
- class odym.ODYM_Classes.Obj(Name=None, ID=None, UUID=None)
Class with the object definition for a data object (system, process, flow, …) in ODYM
- class odym.ODYM_Classes.Parameter(Name=None, ID=None, UUID=None, P_Res=None, MetaData=None, Indices=None, Values=None, Uncert=None, Unit=None)
Class with the definition and methods for parameters
- class odym.ODYM_Classes.Process(Name=None, ID=None, UUID=None, Bipartite=None, Graphical=None, Extensions=None, Parameters=None)
Class with the definition and methods for a process in ODYM
- class odym.ODYM_Classes.Stock(Name=None, ID=None, UUID=None, P_Res=None, Indices=None, Type=None, Values=None, Uncert=None, Unit=None, Color=None)
Class with the definition and methods for a stock in ODYM