diff --git a/Makefile b/Makefile
index bdc6b1a157..543b7b4fc5 100644
--- a/Makefile
+++ b/Makefile
@@ -3,3 +3,7 @@
xml:
cd input/gcamdata && Rscript -e "devtools::load_all('.')" -e "driver(write_output=FALSE, write_xml=TRUE)"
+
+install_hector:
+ git submodule update --init cvs/objects/climate/source/hector
+
diff --git a/cvs/objects/build/linux/Makefile b/cvs/objects/build/linux/Makefile
index c5b6a22280..7fcb94c07e 100644
--- a/cvs/objects/build/linux/Makefile
+++ b/cvs/objects/build/linux/Makefile
@@ -48,9 +48,6 @@ main_dir : libgcam.a
@date
-install_hector:
- git submodule update --init ../../climate/source/hector
-
# target for debugging configure.gcam
varchk:
@echo GCAMLIB_HOME: $(GCAMLIB_HOME)
diff --git a/cvs/objects/build/linux/configure.gcam b/cvs/objects/build/linux/configure.gcam
index 5fcb3b8416..3045c7f095 100644
--- a/cvs/objects/build/linux/configure.gcam
+++ b/cvs/objects/build/linux/configure.gcam
@@ -11,7 +11,7 @@ endif
ifeq ($(strip $(CC)),)
CC = gcc
endif
-CXXOPTIM = -O2 -pthread
+CXXOPTIM = -O3 -pthread
CXXDEBUG = -ggdb -DNDEBUG -DFUSION_MAX_VECTOR_SIZE=30
CXXBASEOPTS = $(CXXDEBUG)
@@ -58,6 +58,10 @@ ifeq ($(USE_HECTOR),1)
HECTOR_INCLUDE = -I../../climate/source/hector/headers
+ ifeq ($(strip $(BOOST_LIB)),)
+ $(error Unable to detect Boost lib path, please set env variable BOOST_LIB)
+ endif
+
HECTOR_LIB = -L$(BOOST_LIB) -Wl,-rpath,$(BOOST_LIB) -lhector -lboost_system -lboost_filesystem
endif # if(USE_HECTOR==1)
@@ -83,11 +87,26 @@ else
endif
#
ifneq ($(USE_GCAM_PARALLEL),0)
+ifeq ($(strip $(TBB_INC)),)
+ $(error Unable to detect TBB include path, please set env variable TBB_INCLUDE)
+endif
+ifeq ($(strip $(TBB_LIBRARY)),)
+ $(error Unable to detect TBB lib path, please set env variable TBB_LIB)
+endif
TBB_LIB_IMPORT = -l$(LIBTBB) -l$(LIBTBBMALLOC) -l$(LIBTBBMALLOC_PROXY)
endif
# Set up Java paths for compiling via environment variables if we are using it
ifneq ($(HAVE_JAVA),0)
+ifeq ($(strip $(JAVA_INCLUDE)),)
+ $(error Unable to detect Java include path, please set env variable JAVA_INCLUDE)
+endif
+ifeq ($(strip $(JAVA_LIB)),)
+ $(error Unable to detect Java lib path, please set env variable JAVA_LIB)
+endif
+ifeq ($(strip $(JARS_LIB)),)
+ $(error Unable to detect Jar lib path, please set env variable JARS_LIB)
+endif
## custom values set by environment variables
OSNAME_LOWERCASE := $(shell uname -s | tr '[:upper:]' '[:lower:]')
JAVAINC = -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OSNAME_LOWERCASE)
@@ -108,6 +127,14 @@ endif
### locations of library include files
# BOOST_INCLUDE should be set in the user environment on Evergreen by running 'tap boost'.
BOOSTINC = $(BOOST_INCLUDE)
+ifeq ($(strip $(BOOST_INCLUDE)),)
+ $(error Unable to detect Boost include path, please set env variable BOOST_INCLUDE)
+endif
+
+
+ifeq ($(strip $(EIGEN_INCLUDE)),)
+ $(error Unable to detect Eigen include path, please set env variable EIGEN_INCLUDE)
+endif
#
### locations of libraries
diff --git a/cvs/objects/build/vc10/objects.vcxproj b/cvs/objects/build/vc10/objects.vcxproj
index 52491dfa2a..5a06736eb2 100644
--- a/cvs/objects/build/vc10/objects.vcxproj
+++ b/cvs/objects/build/vc10/objects.vcxproj
@@ -743,10 +743,8 @@
-
-
@@ -1057,9 +1055,7 @@
-
-
@@ -1112,4 +1108,4 @@
-
+
\ No newline at end of file
diff --git a/cvs/objects/build/xcode3/objects.xcodeproj/project.pbxproj b/cvs/objects/build/xcode3/objects.xcodeproj/project.pbxproj
index 4289d1485e..bf01bdf8db 100644
--- a/cvs/objects/build/xcode3/objects.xcodeproj/project.pbxproj
+++ b/cvs/objects/build/xcode3/objects.xcodeproj/project.pbxproj
@@ -110,10 +110,8 @@
CD4887A4122873C200F5A88A /* policy_ghg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885A8122873C100F5A88A /* policy_ghg.cpp */; };
CD4887A5122873C200F5A88A /* policy_portfolio_standard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885A9122873C100F5A88A /* policy_portfolio_standard.cpp */; };
CD4887A6122873C200F5A88A /* batch_csv_outputter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885BD122873C100F5A88A /* batch_csv_outputter.cpp */; };
- CD4887AA122873C200F5A88A /* energy_balance_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885C1122873C100F5A88A /* energy_balance_table.cpp */; };
CD4887AC122873C200F5A88A /* graph_printer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885C3122873C100F5A88A /* graph_printer.cpp */; };
CD4887AF122873C200F5A88A /* land_allocator_printer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885C6122873C100F5A88A /* land_allocator_printer.cpp */; };
- CD4887B4122873C200F5A88A /* storage_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885CB122873C100F5A88A /* storage_table.cpp */; };
CD4887B5122873C200F5A88A /* xml_db_outputter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885CC122873C100F5A88A /* xml_db_outputter.cpp */; };
CD4887B6122873C200F5A88A /* accumulated_grade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885DA122873C100F5A88A /* accumulated_grade.cpp */; };
CD4887B7122873C200F5A88A /* accumulated_post_grade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD4885DB122873C100F5A88A /* accumulated_post_grade.cpp */; };
@@ -536,16 +534,12 @@
CD4885A8122873C100F5A88A /* policy_ghg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = policy_ghg.cpp; sourceTree = ""; };
CD4885A9122873C100F5A88A /* policy_portfolio_standard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = policy_portfolio_standard.cpp; sourceTree = ""; };
CD4885AC122873C100F5A88A /* batch_csv_outputter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = batch_csv_outputter.h; sourceTree = ""; };
- CD4885B0122873C100F5A88A /* energy_balance_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = energy_balance_table.h; sourceTree = ""; };
CD4885B2122873C100F5A88A /* graph_printer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graph_printer.h; sourceTree = ""; };
CD4885B5122873C100F5A88A /* land_allocator_printer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = land_allocator_printer.h; sourceTree = ""; };
- CD4885BA122873C100F5A88A /* storage_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = storage_table.h; sourceTree = ""; };
CD4885BB122873C100F5A88A /* xml_db_outputter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xml_db_outputter.h; sourceTree = ""; };
CD4885BD122873C100F5A88A /* batch_csv_outputter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = batch_csv_outputter.cpp; sourceTree = ""; };
- CD4885C1122873C100F5A88A /* energy_balance_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = energy_balance_table.cpp; sourceTree = ""; };
CD4885C3122873C100F5A88A /* graph_printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = graph_printer.cpp; sourceTree = ""; };
CD4885C6122873C100F5A88A /* land_allocator_printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = land_allocator_printer.cpp; sourceTree = ""; };
- CD4885CB122873C100F5A88A /* storage_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = storage_table.cpp; sourceTree = ""; };
CD4885CC122873C100F5A88A /* xml_db_outputter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xml_db_outputter.cpp; sourceTree = ""; };
CD4885CF122873C100F5A88A /* accumulated_grade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = accumulated_grade.h; sourceTree = ""; };
CD4885D0122873C100F5A88A /* accumulated_post_grade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = accumulated_post_grade.h; sourceTree = ""; };
@@ -1475,10 +1469,8 @@
isa = PBXGroup;
children = (
CD4885AC122873C100F5A88A /* batch_csv_outputter.h */,
- CD4885B0122873C100F5A88A /* energy_balance_table.h */,
CD4885B2122873C100F5A88A /* graph_printer.h */,
CD4885B5122873C100F5A88A /* land_allocator_printer.h */,
- CD4885BA122873C100F5A88A /* storage_table.h */,
CD4885BB122873C100F5A88A /* xml_db_outputter.h */,
);
path = include;
@@ -1488,10 +1480,8 @@
isa = PBXGroup;
children = (
CD4885BD122873C100F5A88A /* batch_csv_outputter.cpp */,
- CD4885C1122873C100F5A88A /* energy_balance_table.cpp */,
CD4885C3122873C100F5A88A /* graph_printer.cpp */,
CD4885C6122873C100F5A88A /* land_allocator_printer.cpp */,
- CD4885CB122873C100F5A88A /* storage_table.cpp */,
CD4885CC122873C100F5A88A /* xml_db_outputter.cpp */,
);
path = source;
@@ -2242,11 +2232,9 @@
CD4887A4122873C200F5A88A /* policy_ghg.cpp in Sources */,
CD4887A5122873C200F5A88A /* policy_portfolio_standard.cpp in Sources */,
CD4887A6122873C200F5A88A /* batch_csv_outputter.cpp in Sources */,
- CD4887AA122873C200F5A88A /* energy_balance_table.cpp in Sources */,
CD4887AC122873C200F5A88A /* graph_printer.cpp in Sources */,
CD3CFCD8238DA5B800016CDB /* food_demand_input.cpp in Sources */,
CD4887AF122873C200F5A88A /* land_allocator_printer.cpp in Sources */,
- CD4887B4122873C200F5A88A /* storage_table.cpp in Sources */,
CD4887B5122873C200F5A88A /* xml_db_outputter.cpp in Sources */,
CD4887B6122873C200F5A88A /* accumulated_grade.cpp in Sources */,
CD4887B7122873C200F5A88A /* accumulated_post_grade.cpp in Sources */,
diff --git a/cvs/objects/containers/include/region.h b/cvs/objects/containers/include/region.h
index 1d56a5a081..1089c7ea96 100644
--- a/cvs/objects/containers/include/region.h
+++ b/cvs/objects/containers/include/region.h
@@ -61,7 +61,6 @@
class Demographic;
class Sector;
class GHGPolicy;
-class PolicyPortfolioStandard;
class Curve;
class AResource;
class IInfo;
@@ -117,10 +116,7 @@ class Region: public INamed, public IVisitable, public AParsable, protected boos
DEFINE_VARIABLE( CONTAINER, "sector", mSupplySector, std::vector ),
/*! \brief vector of pointers to ghg market objects, container for constraints and emissions */
- DEFINE_VARIABLE( CONTAINER, "ghg-policies", mGhgPolicies, std::vector ),
-
- /*! \brief vector of pointers to portfolio standard market objects, container for constraints */
- DEFINE_VARIABLE( CONTAINER, "policies", mPolicies, std::vector ),
+ DEFINE_VARIABLE( CONTAINER, "policies", mGhgPolicies, std::vector ),
/*! \brief vector of pointers to resource objects */
DEFINE_VARIABLE( CONTAINER, "resource", mResources, std::vector ),
diff --git a/cvs/objects/containers/source/region.cpp b/cvs/objects/containers/source/region.cpp
index 0f79e58ad2..8864fc9542 100644
--- a/cvs/objects/containers/source/region.cpp
+++ b/cvs/objects/containers/source/region.cpp
@@ -81,8 +81,6 @@ typedef std::vector::iterator SectorIterator;
typedef std::vector::const_iterator CSectorIterator;
typedef std::vector::iterator GHGPolicyIterator;
typedef std::vector::const_iterator CGHGPolicyIterator;
-typedef std::vector::iterator PolicyIterator;
-typedef std::vector::const_iterator CPolicyIterator;
typedef std::vector::iterator ResourceIterator;
typedef std::vector::const_iterator CResourceIterator;
@@ -107,10 +105,6 @@ void Region::clear(){
for( GHGPolicyIterator policyIter = mGhgPolicies.begin(); policyIter != mGhgPolicies.end(); ++policyIter ){
delete *policyIter;
}
-
- for( PolicyIterator policyIter = mPolicies.begin(); policyIter != mPolicies.end(); ++policyIter ){
- delete *policyIter;
- }
for ( ResourceIterator rescIter = mResources.begin(); rescIter != mResources.end(); ++rescIter ) {
delete *rescIter;
@@ -151,16 +145,6 @@ void Region::toDebugXML( const int period, ostream& out, Tabs* tabs ) const {
for( CSectorIterator j = mSupplySector.begin(); j != mSupplySector.end(); j++ ){
( *j )->toDebugXML( period, out, tabs );
}
-
- // write out mGhgPolicies objects.
- for( CGHGPolicyIterator currPolicy = mGhgPolicies.begin(); currPolicy != mGhgPolicies.end(); ++currPolicy ){
- (*currPolicy)->toDebugXML( period, out, tabs );
- }
-
- // write out mPolicies objects.
- for( CPolicyIterator currPolicy = mPolicies.begin(); currPolicy != mPolicies.end(); ++currPolicy ){
- (*currPolicy)->toDebugXML( period, out, tabs );
- }
// write out the resources objects.
for( CResourceIterator currResource = mResources.begin(); currResource != mResources.end(); ++currResource ){
@@ -199,9 +183,6 @@ void Region::completeInit() {
for( GHGPolicyIterator ghgPolicy = mGhgPolicies.begin(); ghgPolicy != mGhgPolicies.end(); ++ghgPolicy ){
(*ghgPolicy)->completeInit( mName );
}
- for( PolicyIterator policy = mPolicies.begin(); policy != mPolicies.end(); ++policy ){
- (*policy)->completeInit( mName );
- }
for( ResourceIterator resourceIter = mResources.begin(); resourceIter != mResources.end(); ++resourceIter ) {
(*resourceIter)->completeInit( mName, mRegionInfo );
}
@@ -212,9 +193,6 @@ void Region::completeInit() {
* \param aPeriod The model period about to begin.
*/
void Region::initCalc( const int aPeriod ) {
- for( auto currPolicy : mPolicies ) {
- currPolicy->initCalc( mName, aPeriod );
- }
}
/*! \brief Function to finalize objects after a period is solved.
@@ -233,9 +211,6 @@ void Region::postCalc( const int aPeriod ){
for( ResourceIterator currResource = mResources.begin(); currResource != mResources.end(); ++currResource ){
(*currResource)->postCalc( mName, aPeriod );
}
- for( auto currPolicy : mPolicies ) {
- currPolicy->postCalc( mName, aPeriod );
- }
}
/*! \brief Update a visitor for a Region.
diff --git a/cvs/objects/containers/source/world.cpp b/cvs/objects/containers/source/world.cpp
index 1c6b0fe7d8..b0762dbd81 100644
--- a/cvs/objects/containers/source/world.cpp
+++ b/cvs/objects/containers/source/world.cpp
@@ -71,7 +71,6 @@
#include "emissions/include/emissions_summer.h"
#include "emissions/include/luc_emissions_summer.h"
#include "technologies/include/global_technology_database.h"
-#include "reporting/include/energy_balance_table.h"
#include "containers/include/market_dependency_finder.h"
#include "technologies/include/global_technology_database.h"
#include "containers/include/iactivity.h"
@@ -219,20 +218,6 @@ void World::initCalc( const int period ) {
( *i )->initCalc( period );
}
- Configuration* conf = Configuration::getInstance();
- if( conf->getBool( "CalibrationActive" ) ){
- // print an I/O table for debuging before we do any calibration
- ILogger& calLog = ILogger::getLogger( "calibration_log" );
- calLog.setLevel( ILogger::DEBUG );
- for( CRegionIterator reigonIt = mRegions.begin(); reigonIt != mRegions.end(); ++reigonIt ){
- // for this table we will want a condensed table without non-calibrated values
- // so the user can get an easy to see view of what they put in
- EnergyBalanceTable table( (*reigonIt)->getName(), calLog, true, false );
- (*reigonIt)->accept( &table, period );
- table.finish();
- }
- }
-
// Reset the calc counter.
mCalcCounter->startNewPeriod();
#if GCAM_PARALLEL_ENABLED
@@ -625,28 +610,9 @@ void World::runClimateModel( int aPeriod ) {
*/
bool World::isAllCalibrated( const int period, double calAccuracy, const bool printWarnings ) const {
bool isAllCalibrated = true;
- ILogger& calLog = ILogger::getLogger( "calibration_log" );
- calLog.setLevel( ILogger::DEBUG );
for( CRegionIterator i = mRegions.begin(); i != mRegions.end(); i++ ){
bool currRegionCalibrated = ( *i )->isAllCalibrated( period, calAccuracy, printWarnings );
isAllCalibrated &= currRegionCalibrated;
- // if we did not calibrate this region correctly and we are printing warnings then give the
- // user some I/O tables to help them understand what was inconsistent
- if( !currRegionCalibrated && printWarnings ) {
- // we want to give the user two tables to use one with a condensed view
- // with all inputs and outputs so they can see what didn't calibrate
- // and another table fully expanded with just the calibrated values
- calLog << "Energy balance table where inputs and outputs have been replaced by a"
- << " calibrated value if it exists:" << endl;
- EnergyBalanceTable condensedTable( (*i)->getName(), calLog, true, true );
- (*i)->accept( &condensedTable, period );
- condensedTable.finish();
-
- calLog << "Full energy balalce table with just cal values:" << endl;
- EnergyBalanceTable fullTable( (*i)->getName(), calLog, false, false );
- (*i)->accept( &fullTable, period );
- fullTable.finish();
- }
}
return isAllCalibrated;
diff --git a/cvs/objects/emissions/source/co2_emissions.cpp b/cvs/objects/emissions/source/co2_emissions.cpp
index 9ddd88f102..1828bf64a2 100644
--- a/cvs/objects/emissions/source/co2_emissions.cpp
+++ b/cvs/objects/emissions/source/co2_emissions.cpp
@@ -89,6 +89,7 @@ const string& CO2Emissions::getXMLNameStatic(){
return XML_NAME;
}
+
void CO2Emissions::toDebugXMLDerived( const int aPeriod, ostream& aOut, Tabs* aTabs ) const {
}
@@ -188,9 +189,11 @@ double CO2Emissions::calcOutputEmissions( const vector& aOutputs,
const int aPeriod ) const
{
double emissions = 0;
+ assert(aOutputs.size() > 0);
+ const double primaryOutput = aOutputs[ 0 ]->getPhysicalOutput( aPeriod );
for( unsigned int i = 0; i < aOutputs.size(); ++i ){
- emissions += aOutputs[ i ]->getEmissionsPerOutput( getName(), aPeriod )
- * aOutputs[ i ]->getPhysicalOutput( aPeriod );
+ emissions += aOutputs[ i ]->getEmissionsPerOutput( getName(), aPeriod)
+ * primaryOutput;
}
return emissions;
}
@@ -216,6 +219,7 @@ double CO2Emissions::calcInputCO2Emissions( const vector& aInputs, cons
totalEmissions += (*input)->getPhysicalDemand( aPeriod )
* (*input)->getCO2EmissionsCoefficient( getName(), aPeriod );
}
+
return totalEmissions;
}
diff --git a/cvs/objects/functions/source/food_demand_function.cpp b/cvs/objects/functions/source/food_demand_function.cpp
index b5f371261f..dd035278ff 100644
--- a/cvs/objects/functions/source/food_demand_function.cpp
+++ b/cvs/objects/functions/source/food_demand_function.cpp
@@ -164,7 +164,7 @@ double FoodDemandFunction::calcDemand( InputSet& aInput, double income, const st
if(alphaTotal > budget) {
ILogger& mainLog = ILogger::getLogger( "main_log" );
- mainLog.setLevel( ILogger::WARNING );
+ mainLog.setLevel( ILogger::DEBUG );
mainLog << "Share of budget spent on FoodDemand: " << alphaTotal << " exceeds total income in " << aRegionName << endl;
}
diff --git a/cvs/objects/policy/include/policy_ghg.h b/cvs/objects/policy/include/policy_ghg.h
index 61d38554dc..5d88783e5d 100644
--- a/cvs/objects/policy/include/policy_ghg.h
+++ b/cvs/objects/policy/include/policy_ghg.h
@@ -55,6 +55,7 @@
#include "util/base/include/data_definition_util.h"
// Need to forward declare the subclasses as well.
+class PolicyPortfolioStandard;
class LinkedGHGPolicy;
/*!
@@ -84,7 +85,7 @@ class GHGPolicy: public INamed, private boost::noncopyable {
/* Declare all subclasses of GHGPolicy to allow automatic traversal of the
* hierarchy under introspection.
*/
- DEFINE_SUBCLASS_FAMILY( GHGPolicy, LinkedGHGPolicy ),
+ DEFINE_SUBCLASS_FAMILY( GHGPolicy, PolicyPortfolioStandard, LinkedGHGPolicy ),
//! GHG name
DEFINE_VARIABLE( SIMPLE, "name", mName, std::string ),
diff --git a/cvs/objects/policy/include/policy_portfolio_standard.h b/cvs/objects/policy/include/policy_portfolio_standard.h
index 97a51f4425..ef2d584457 100644
--- a/cvs/objects/policy/include/policy_portfolio_standard.h
+++ b/cvs/objects/policy/include/policy_portfolio_standard.h
@@ -45,41 +45,32 @@
* \author Sonny Kim
*/
-#include
-#include
-
-#include "util/base/include/inamed.h"
-#include "util/base/include/time_vector.h"
-#include "util/base/include/value.h"
-#include "util/base/include/data_definition_util.h"
+#include "policy/include/policy_ghg.h"
/*!
* \ingroup Objects
* \brief Class which defines a portfolio standard policy.
* \author Sonny Kim
*/
-class PolicyPortfolioStandard: public INamed, private boost::noncopyable {
+class PolicyPortfolioStandard: public GHGPolicy {
public:
PolicyPortfolioStandard();
- const std::string& getName() const;
- const std::string& getXMLName() const;
+ virtual const std::string& getName() const;
+ virtual const std::string& getXMLName() const;
static const std::string& getXMLNameStatic();
- void toDebugXML( const int period, std::ostream& out, Tabs* tabs ) const;
- void completeInit( const std::string& aRegionName );
- void initCalc( const std::string& aRegionName, const int aPeriod );
- void postCalc( const std::string& aRegionName, const int aPeriod );
+ virtual void toDebugXML( const int period, std::ostream& out, Tabs* tabs ) const;
+ virtual void completeInit( const std::string& aRegionName );
protected:
- DEFINE_DATA(
- // PolicyPortfolioStandard is the only member of this container hierarchy.
- DEFINE_SUBCLASS_FAMILY( PolicyPortfolioStandard ),
+ DEFINE_DATA_WITH_PARENT(
+ GHGPolicy,
//! Policy name
- DEFINE_VARIABLE( SIMPLE, "name", mName, std::string ),
+ //DEFINE_VARIABLE( SIMPLE, "name", mName, std::string ),
//! Name of the market
- DEFINE_VARIABLE( SIMPLE, "market", mMarket, std::string ),
+ //DEFINE_VARIABLE( SIMPLE, "market", mMarket, std::string ),
//! Type of policy (tax or subsidy)
DEFINE_VARIABLE( SIMPLE, "policyType", mPolicyType, std::string ),
@@ -88,10 +79,10 @@ class PolicyPortfolioStandard: public INamed, private boost::noncopyable {
DEFINE_VARIABLE( SIMPLE, "isShareBased", mIsShareBased, bool ),
//! Quantity constraint by year
- DEFINE_VARIABLE( ARRAY, "constraint", mConstraint, objects::PeriodVector ),
+ //DEFINE_VARIABLE( ARRAY, "constraint", mConstraint, objects::PeriodVector ),
//! Fixed tax on Fuel by year($/GJ)
- DEFINE_VARIABLE( ARRAY, "fixedTax", mFixedTax, objects::PeriodVector ),
+ //DEFINE_VARIABLE( ARRAY, "fixedTax", mFixedTax, objects::PeriodVector ),
//! Share of total or sectoral output
DEFINE_VARIABLE( ARRAY, "share-of-sector-output", mShareOfSectorOutput, objects::PeriodVector ),
diff --git a/cvs/objects/policy/source/policy_portfolio_standard.cpp b/cvs/objects/policy/source/policy_portfolio_standard.cpp
index e7aaa00cdc..4974b267da 100644
--- a/cvs/objects/policy/source/policy_portfolio_standard.cpp
+++ b/cvs/objects/policy/source/policy_portfolio_standard.cpp
@@ -223,20 +223,3 @@ void PolicyPortfolioStandard::completeInit( const string& aRegionName ) {
}
}
-/*!
- * \brief Perform any initializations that need to occur prior to attempting to solve
- * aPeriod.
- * \param aRegionName The name of the containing region.
- * \param aPeriod The current model period about to begin.
- */
-void PolicyPortfolioStandard::initCalc( const string& aRegionName, const int aPeriod ) {
-}
-
-/*!
- * \brief Perform any computations after a model period has found a solution.
- * \param aRegionName The name of the containing region.
- * \param aPeriod The current model period which just finished.
- */
-void PolicyPortfolioStandard::postCalc( const string& aRegionName, const int aPeriod ) {
-}
-
diff --git a/cvs/objects/reporting/include/energy_balance_table.h b/cvs/objects/reporting/include/energy_balance_table.h
deleted file mode 100644
index cd31a35fa8..0000000000
--- a/cvs/objects/reporting/include/energy_balance_table.h
+++ /dev/null
@@ -1,148 +0,0 @@
-#ifndef _ENERGY_BALANCE_TABLE_H_
-#define _ENERGY_BALANCE_TABLE_H_
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-/*
-* LEGAL NOTICE
-* This computer software was prepared by Battelle Memorial Institute,
-* hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830
-* with the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
-* CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
-* LIABILITY FOR THE USE OF THIS SOFTWARE. This notice including this
-* sentence must appear on any copies of this computer software.
-*
-* EXPORT CONTROL
-* User agrees that the Software will not be shipped, transferred or
-* exported into any country or used in any manner prohibited by the
-* United States Export Administration Act or any other applicable
-* export laws, restrictions or regulations (collectively the "Export Laws").
-* Export of the Software may require some form of license or other
-* authority from the U.S. Government, and failure to obtain such
-* export control license may result in criminal liability under
-* U.S. laws. In addition, if the Software is identified as export controlled
-* items under the Export Laws, User represents and warrants that User
-* is not a citizen, or otherwise located within, an embargoed nation
-* (including without limitation Iran, Syria, Sudan, Cuba, and North Korea)
-* and that User is not otherwise prohibited
-* under the Export Laws from receiving the Software.
-*
-* Copyright 2011 Battelle Memorial Institute. All Rights Reserved.
-* Distributed as open-source under the terms of the Educational Community
-* License version 2.0 (ECL 2.0). http://www.opensource.org/licenses/ecl2.php
-*
-* For further details, see: http://www.globalchange.umd.edu/models/gcam/
-*
-*/
-
-
-/*!
-* \file energy_balance_table.h
-* \ingroup Objects
-* \brief EnergyBalanceTable class header file.
-* \author Pralit Patel
-*/
-
-#include
-#include