Greet 2014
Documentation for the GREET 2014 API
 All Classes Namespaces Functions Variables Enumerations Properties Events
Greet.DataStructureV3.Entities.Mix Class Reference

A mix object is a wrapper for blending multiple mixes or pathways together It allows the user to get weigh averaged results for a mix or blend of multiple pathways or multiple products More...

Inheritance diagram for Greet.DataStructureV3.Entities.Mix:
Greet.DataStructureV3.Interfaces.IMix Greet.DataStructureV3.IHaveMetadata Greet.DataStructureV3.Entities.IHaveAPicture Greet.DataStructureV3.Interfaces.IXmlObj

Public Types

enum  SharesType { energy, mass, volume }
 

Public Member Functions

 Mix (GData data)
 
 Mix (GData data, XmlNode node, string optionalParamPrefix)
 
bool CheckIntegrity (GData data, bool showIds, out string errors)
 Check the structural Integrity of the mix and return a string containing messages if errors were detected. More...
 
void FromXmlNode (IData data, XmlNode node)
 
Dictionary< IIO, ResultsGetResults (GData data)
 
Dictionary< IIO, IResultsGetUpstreamResults (IData data)
 Upstream results associated to that mix More...
 
void PrepareForNewCalculations (GData data)
 Compute the normalizing unit according to the Share Type (energy, mass or volume) and the resources involved into the mix. Check that all resources can be converted to that Share Type. If the results do not exist, create an empty object for it. If the results do exist, do not clear them unless the Share Type has changed since the last calculations. More...
 
override string ToString ()
 
XmlNode ToXmlNode (XmlDocument xmlDoc)
 
XmlNode ToXmlResultsNode (XmlDocument doc, int resourceId)
 
- Public Member Functions inherited from Greet.DataStructureV3.IHaveResults
Dictionary< IIO, ResultsGetResults (GData data)
 

Static Public Member Functions

static void FlattenPathways (List< IProductionItem > list, Dictionary< int, Mix > mixesData, ref List< int > mixPathwaysUsed, ref List< int > mixUsed)
 Performs a deep search and find all references to pathways More...
 

Public Attributes

FunctionalUnitPreference _functionalUnitResultsDisplay = new FunctionalUnitPreference()
 Prefered functional unit for display results More...
 
int _lastCalculatedOnIteration = -1
 Stores the last iteration number on which this mix was calculated this is used to save time and not calculated twice the same mix during the same iteration if that mix is referenced multiple times in the model More...
 
SharesType _sharesType = SharesType.energy
 Defines how the shares are used for a mix. When all pathways outputs the same resources this doesn't matter but when we are mixing different products knowing if we are using volumetric, massic or energetic shares is very important for the results. More...
 
bool _usesFixedValues = false
 If true, fixed values will be used for this mix rather than weight averaging the fuel production items. More...
 
CanonicalOutput mixOutputResults = new CanonicalOutput(null)
 The last calculated mix energy and emissions balance The results in that Enem, the bottom unit and the normalizingUnit attribute of this class should be the same More...
 
PMOutput output = new PMOutput()
 Output for the mix, defines a unique GUID and resources More...
 

Properties

List< FuelProductionEntityEntities [get, set]
 
DefaultValuesIfNoPathway FixedValues [get, set]
 Fixed values to be used for the mix upstream. Only used if the usedFixedValues is set to True during the calculations More...
 
List< IProductionItemFuelProductionEntities [get]
 
FunctionalUnitPreference GetUnitPreference [get]
 Returns display unit preference for this process More...
 
string Header [get]
 
string Help [get, set]
 
int Id [get, set]
 
int MainOutputResourceID [get, set]
 Returns the Resource id of the resource made by the Mix More...
 
Results MixBalance [get, set]
 
string ModifiedBy [get, set]
 
string ModifiedOn [get, set]
 
string Name [get, set]
 
string Notes [get, set]
 
string PictureName [get, set]
 
- Properties inherited from Greet.DataStructureV3.Interfaces.IMix
List< IProductionItemFuelProductionEntities [get]
 Returns a list of fuel production entities the mix uses More...
 
int Id [get, set]
 Unique ID for this mix among the mixes More...
 
int MainOutputResourceID [get]
 Unique ID for this mix among the mixes More...
 
string Name [get, set]
 Name for this mix as it is going to show on the graphical interface More...
 
- Properties inherited from Greet.DataStructureV3.Entities.IHaveAPicture
string PictureName [get, set]
 Get or Set the image name of the object More...
 

Detailed Description

A mix object is a wrapper for blending multiple mixes or pathways together It allows the user to get weigh averaged results for a mix or blend of multiple pathways or multiple products

Member Function Documentation

bool Greet.DataStructureV3.Entities.Mix.CheckIntegrity ( GData  data,
bool  showIds,
out string  errors 
)

Check the structural Integrity of the mix and return a string containing messages if errors were detected.

Returns
static void Greet.DataStructureV3.Entities.Mix.FlattenPathways ( List< IProductionItem list,
Dictionary< int, Mix mixesData,
ref List< int >  mixPathwaysUsed,
ref List< int >  mixUsed 
)
static

Performs a deep search and find all references to pathways

Parameters
listInitial list of production items, when called the first time this should be the production items of the Mix we want to deep search
mixesData
mixPathwaysUsed
mixUsed
Dictionary<IIO, IResults> Greet.DataStructureV3.Entities.Mix.GetUpstreamResults ( IData  data)

Upstream results associated to that mix

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

Parameters
dataData object needed for references
Returns
Dictionary containing the allocated results for the resource created by this mix

Implements Greet.DataStructureV3.Interfaces.IMix.

void Greet.DataStructureV3.Entities.Mix.PrepareForNewCalculations ( GData  data)

Compute the normalizing unit according to the Share Type (energy, mass or volume) and the resources involved into the mix. Check that all resources can be converted to that Share Type. If the results do not exist, create an empty object for it. If the results do exist, do not clear them unless the Share Type has changed since the last calculations.

Member Data Documentation

FunctionalUnitPreference Greet.DataStructureV3.Entities.Mix._functionalUnitResultsDisplay = new FunctionalUnitPreference()

Prefered functional unit for display results

int Greet.DataStructureV3.Entities.Mix._lastCalculatedOnIteration = -1

Stores the last iteration number on which this mix was calculated this is used to save time and not calculated twice the same mix during the same iteration if that mix is referenced multiple times in the model

SharesType Greet.DataStructureV3.Entities.Mix._sharesType = SharesType.energy

Defines how the shares are used for a mix. When all pathways outputs the same resources this doesn't matter but when we are mixing different products knowing if we are using volumetric, massic or energetic shares is very important for the results.

bool Greet.DataStructureV3.Entities.Mix._usesFixedValues = false

If true, fixed values will be used for this mix rather than weight averaging the fuel production items.

CanonicalOutput Greet.DataStructureV3.Entities.Mix.mixOutputResults = new CanonicalOutput(null)

The last calculated mix energy and emissions balance The results in that Enem, the bottom unit and the normalizingUnit attribute of this class should be the same

PMOutput Greet.DataStructureV3.Entities.Mix.output = new PMOutput()

Output for the mix, defines a unique GUID and resources

Property Documentation

DefaultValuesIfNoPathway Greet.DataStructureV3.Entities.Mix.FixedValues
getset

Fixed values to be used for the mix upstream. Only used if the usedFixedValues is set to True during the calculations

FunctionalUnitPreference Greet.DataStructureV3.Entities.Mix.GetUnitPreference
get

Returns display unit preference for this process

int Greet.DataStructureV3.Entities.Mix.MainOutputResourceID
getset

Returns the Resource id of the resource made by the Mix


The documentation for this class was generated from the following file: