Greet 2014
Documentation for the GREET 2014 API
|
Public Member Functions | |
Pathway (int[] existingPathwayIDs) | |
Pathway (GData data, XmlNode pathwayNode) | |
This constructor instantiate all Pathway attributes from the data provided in the XML node More... | |
uint | CheckEdge (Edge edge, GData data) |
Check the edge connections at boths ends and see if this is valid or not Returns an error code describing the issue, the error can be checked bit by bit to know see if one or more issues are detected More... | |
KeyValuePair< int, string > | CheckPathwayGlobal (GData data) |
Check the properties of a pathway and return error number and human readable sentence to errors if any is detected More... | |
void | ClearResults () |
Clears the results of all the processreference thus clearing the results of the pathway. More... | |
int | CompareTo (object obj) |
int | FindOutputDepth (Guid guid) |
Performs a breadth-first search and return the index of the output in the graph representaiton of the pathway More... | |
string | FindOutputName (Guid guid, GData data) |
Returns the process name from which one of the allocated outputs is connected to the desired pathway output More... | |
void | FromXmlNode (IData data, XmlNode pathwayNode) |
Instantiate all properties of the pathway from the data contained into an XML node More... | |
AOutput | getMainOutputFromProcess (GData data) |
CanonicalOutput | getMainOutputResults () |
CanonicalOutput | getOutputResults (Guid guid) |
Get output results from a Pathway output Guid More... | |
Dictionary< IIO, Results > | GetResults (GData data) |
Returns results for all outputs of this pathway Keys are PathwayOutput.Id members More... | |
Dictionary< IIO, IResults > | GetUpstreamResults (IData data) |
Upstream results associated to that pathway More... | |
bool | hasCycle () |
Performs a depth-first search in order to detect cycles in the pathway More... | |
override string | ToString () |
XmlNode | ToXmlNode (XmlDocument xmlDoc) |
XmlNode | ToXmlResultsNode (XmlDocument doc) |
Returns a node containing the results process by process for the pathway More... | |
Boolean | Valid (GData data) |
Public Member Functions inherited from Greet.DataStructureV3.IHaveResults | |
Dictionary< IIO, Results > | GetResults (GData data) |
Static Public Member Functions | |
static void | UpdateVerticesAndEdges (Pathway source, Pathway destination) |
Updates the cloned pathway class member vertices edges and outputs from the pathway returned from the PathwayViewer We only wants to update these specific attributes of the pathway as the pathway viewer does not know anything about name, id and other attributes More... | |
Public Attributes | |
double | _residualEmission = 0 |
Residual values between total emissions mass from the lastly calculated iteration. Used to assess convergence of the results More... | |
double | _residualResources = 0 |
Residual values between total resources energy from the lastly calculated iteration. Used to assess convergence of the results More... | |
FunctionalUnitPreference | preferredFunctionalUnit = new FunctionalUnitPreference() |
Prefered functional unit for display More... | |
Properties | |
Dictionary< Guid, CanonicalProcess > | CanonicalProcesses [get, set] |
The list of processes in that category More... | |
List< IEdge > | Edges [get] |
List< Edge > | EdgesData [get, set] |
FunctionalUnitPreference | GetUnitPreference [get] |
Returns display unit preference for this process More... | |
int | Id [get, set] |
An id to define the pathway More... | |
DVDict | InputsByProcessFuel [get] |
Guid | MainOutput [get, set] |
Returns the output defined as the MainOutput of the pathway, only used for simplification reasons thus the user can choose the patwhay as an upstream and the MainOutput will be automatically selected as an Upstream for this pathway. Saves the user from selecting which of the outputs he desires to use More... | |
int | MainOutputResourceID [get] |
Returns the resource ID associated with the main output of the pathway This accessor finds the Output for which the ID match the MainOutput guid and reutrns the resource defined for that output More... | |
string | ModifiedBy [get, set] |
string | ModifiedOn [get, set] |
string | Name [get, set] |
The name of the pathway More... | |
string | Notes [get, set] |
Some notes associated to that pathway More... | |
List< IIO > | Outputs [get] |
List< PMOutput > | OutputsData [get, set] |
string | PictureName [get, set] |
List< IProcessReference > | Processes [get] |
EmissionAmounts | TotalEmissions [get] |
List< IVertex > | Vertices [get] |
Dictionary< Guid, Vertex > | VerticesData [get, set] |
Properties inherited from Greet.DataStructureV3.Entities.IPathwayForDataGridViewDisplay | |
int | Id [get, set] |
string | Name [get, set] |
Properties inherited from Greet.DataStructureV3.Interfaces.IPathway | |
List< IEdge > | Edges [get] |
Edges that represents connections in between the vertices inputs and outputs More... | |
int | Id [get, set] |
Unique ID for this pathway among the pathways More... | |
Guid | MainOutput [get, set] |
Each pathway must define one main output, especially usefull when the pathway has multiple outputs for the same resource ID This is used for simplification reasons, the user can chose a pathway as an upstream and the main intput will be automatically selected as the upstream associated with that pathway. Thus saving the user from chosing which outputs he desires. More... | |
int | MainOutputResourceID [get] |
Returns the resource ID associated with the main output of the pathway. This accessor finds the Output for which the ID match the MainOutput guid and reutrns the resource defined for that output. Returns -1 if the main output cannot be found. More... | |
string | Name [get, set] |
Name for this pathway as it is going to show on the graphical interface More... | |
List< IIO > | Outputs [get] |
string | PictureName [get, set] |
Picture for this pathway as it is going to show on the graphical interface More... | |
List< IProcessReference > | Processes [get] |
Returns and ordered list of the process IDs used in this pathway More... | |
List< IVertex > | Vertices [get] |
Vertices for that Pathway, vertices can hold a reference to a process, a pathway or a mix More... | |
Properties inherited from Greet.DataStructureV3.IHaveMetadata | |
string | ModifiedBy [get, set] |
User that modified this entity the latest time More... | |
string | ModifiedOn [get, set] |
Time at which this was modified for the last time More... | |
string | Notes [get, set] |
Notes associated with that entity More... | |
Properties inherited from Greet.DataStructureV3.Entities.IHaveAPicture | |
string | PictureName [get, set] |
Get or Set the image name of the object More... | |
The pathway class stores vertices and edges that are resprectively representing processes and flows
Before the calculations all processes and flows are converted to a canonical format for the calculations as the same process can be reused in multiple pathways with different upstreams.
The pathway also defines output, these outputs will be available for usage outside of the pathway, one of them must be declared MainOutput so the user dosn't need to choose the output everytime he desires to use this pathway as upstream for something
Greet.DataStructureV3.Entities.Pathway.Pathway | ( | int[] | existingPathwayIDs | ) |
This constructor instantiate the name to "New Pathway " + id
It also finds a new ID for the pathway based on the list of existing pathway IDs passed as a parameter
existingPathwayIDs | Existing pathway IDs to check that we're not creating a new instance with an ID that already exists |
Greet.DataStructureV3.Entities.Pathway.Pathway | ( | GData | data, |
XmlNode | pathwayNode | ||
) |
Check the edge connections at boths ends and see if this is valid or not Returns an error code describing the issue, the error can be checked bit by bit to know see if one or more issues are detected
edge | 0 - Everything is fine 1 - Left and Right resources are different 2 - Input vertex does not exists in the pathway 4 - Output vertex does not exists in the pathway 8 - Input Id does not exists in the refered object (probably an issue in the process IOs IDs) 16 - Output Id does not exists in the refered object (output does not exists for pathway, mix, or process?) 32 - Vertex model does not accepts an input from previous therefore cannot be linked with an edge 64 - Input model ID does not exists 128 - Output model ID does not exists 256 - Edge connected to a displaced co-product
|
KeyValuePair<int, string> Greet.DataStructureV3.Entities.Pathway.CheckPathwayGlobal | ( | GData | data | ) |
Check the properties of a pathway and return error number and human readable sentence to errors if any is detected
data | The GData object for other entities references checks |
void Greet.DataStructureV3.Entities.Pathway.ClearResults | ( | ) |
Clears the results of all the processreference thus clearing the results of the pathway.
int Greet.DataStructureV3.Entities.Pathway.FindOutputDepth | ( | Guid | guid | ) |
Performs a breadth-first search and return the index of the output in the graph representaiton of the pathway
guid | Guid of the output to be searched |
string Greet.DataStructureV3.Entities.Pathway.FindOutputName | ( | Guid | guid, |
GData | data | ||
) |
Returns the process name from which one of the allocated outputs is connected to the desired pathway output
guid | Guid of the desired pathway output |
void Greet.DataStructureV3.Entities.Pathway.FromXmlNode | ( | IData | data, |
XmlNode | pathwayNode | ||
) |
Instantiate all properties of the pathway from the data contained into an XML node
data | Never actually used in the method but necessary to respect the interface |
pathwayNode | The XML node for the pathway |
Implements Greet.DataStructureV3.Interfaces.IXmlObj.
Uses the vertices, edges, pathways outptut and pathway main output definition to find the instance of an process model output
The returned reference to instance corresponds to the output of a process model used in this pathway
May throw exceptions if the request cannot be satisfied
CanonicalOutput Greet.DataStructureV3.Entities.Pathway.getMainOutputResults | ( | ) |
Assuming that the vertices that refers to a process have been converted to canonical process result storage instance
Returns an instance of the CanonicalOutput object if the pathway has been converted to canonical processes
May throw exceptions if the request cannot be satisfied
CanonicalOutput Greet.DataStructureV3.Entities.Pathway.getOutputResults | ( | Guid | guid | ) |
Get output results from a Pathway output Guid
guid | GUID of the pathway output |
Returns results for all outputs of this pathway Keys are PathwayOutput.Id members
data | Data isn't used here and could ignored |
Upstream results associated to that pathway
This is the prefered way to get the upstream for a product from any pathway. This is equivalent of getting the upstream of the last process in this pathway
data | Data object needed for references |
Implements Greet.DataStructureV3.Interfaces.IPathway.
bool Greet.DataStructureV3.Entities.Pathway.hasCycle | ( | ) |
Performs a depth-first search in order to detect cycles in the pathway
XmlNode Greet.DataStructureV3.Entities.Pathway.ToXmlResultsNode | ( | XmlDocument | doc | ) |
Returns a node containing the results process by process for the pathway
doc | The XmlDocument for Namespace URI |
|
static |
Updates the cloned pathway class member vertices edges and outputs from the pathway returned from the PathwayViewer We only wants to update these specific attributes of the pathway as the pathway viewer does not know anything about name, id and other attributes
source | The instance that will serve to update (source) |
destination | The instance that will be updated (destination) |
double Greet.DataStructureV3.Entities.Pathway._residualEmission = 0 |
Residual values between total emissions mass from the lastly calculated iteration. Used to assess convergence of the results
double Greet.DataStructureV3.Entities.Pathway._residualResources = 0 |
Residual values between total resources energy from the lastly calculated iteration. Used to assess convergence of the results
FunctionalUnitPreference Greet.DataStructureV3.Entities.Pathway.preferredFunctionalUnit = new FunctionalUnitPreference() |
Prefered functional unit for display
|
getset |
The list of processes in that category
|
get |
Returns display unit preference for this process
|
getset |
An id to define the pathway
|
getset |
Returns the output defined as the MainOutput of the pathway, only used for simplification reasons thus the user can choose the patwhay as an upstream and the MainOutput will be automatically selected as an Upstream for this pathway. Saves the user from selecting which of the outputs he desires to use
|
get |
Returns the resource ID associated with the main output of the pathway This accessor finds the Output for which the ID match the MainOutput guid and reutrns the resource defined for that output
|
getset |
The name of the pathway
|
getset |
Some notes associated to that pathway
|
get |
Lists outputs that are proper to the pathway
This are not the outputs of the processes. The output of the processes are linked to these outputs using Edges but are not the same instances