-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 in JGCRI/gcam-core from feature/negative-emiss…
…ions to master * commit '2550b19c2120f09957ed4ad6b4933d68b36d7ac3': (22 commits) Address PR comments which are tweaks to make the code more readable. Update Visual Studio project for CTaxInput and NegativeEmissionsFinalDemand Update Xcode project for CTaxInput and NegativeEmissionsFinalDemand Reduce the forcing target tolerance as in practice it leads to 2-3 extra model runs for very little gain. Bump max tax in forcing targets as (at least for the 2.6) we could actually need to surpass the current value. Add negative emissions budget constraint to L270.limits proceesing file. Revert code we ended up not using Fixes to MarketDependencyFinder to ensure all dependencies for "global" activities are made and not just in single region ones. This only affects unsolved "global" activities which currently only consists of unlimited resources and soon negative emissions final demands. Tweaks to help keep solution stable when prices go off the rails Changes to help the negative net emissions contraints solve better Adjust solver config and remove obsolete config file. Expand the range of price in unconventional oil supply curves. Fix line endings on all csv files in energy-data/assumptions. Adjust input_tax for negative emissions constraints Switch logit to absolute for LDV_4W Add constraints on oil in industrial feedstocks. Use the constraint value for solved TAX markets as the forcast demand which hopefully helps solve when policies switch from mostly non-binding to binding. Code for first cut at limiting negative emissions with budget constraints by food expenditures or total negative emissions. Add RES policy to limit non-oil use for oil electricity Switch transportation to absolute cost logit ...
- Loading branch information
Showing
204 changed files
with
4,942 additions
and
848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
#ifndef _CTAX_INPUT_H_ | ||
#define _CTAX_INPUT_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 ctax_input.h | ||
* \ingroup Objects | ||
* \brief CTaxInput class header file. | ||
* \author Pralit Patel | ||
*/ | ||
|
||
#include <string> | ||
#include <xercesc/dom/DOMNode.hpp> | ||
#include "functions/include/minicam_input.h" | ||
#include <memory> | ||
|
||
class Tabs; | ||
|
||
/*! | ||
* \ingroup Objects | ||
* \brief Defines a tax input which is applied relative to a carbon price. | ||
* \details This class only applies some price of a policy that is related | ||
* to the carbon price. It does not add to the supply or demand of | ||
* any constraint. The intended use would be from something such as | ||
* a constraint on net negative emisssions. | ||
* | ||
* <b>XML specification for CTaxInput</b> | ||
* - XML name: \c ctax-input | ||
* - Contained by: Technology | ||
* - Parsing inherited from class: MiniCAMInput | ||
* - Attributes: | ||
* - \c name MiniCAMInput::mName | ||
* - Elements: | ||
* - \c mFuelName String indicating the name of the fuel to look up the | ||
* carbon coefficient of. Generally the same as the fuel | ||
* name of the primary input to the containing technology. | ||
* | ||
* \author Pralit Patel | ||
*/ | ||
class CTaxInput: public MiniCAMInput | ||
{ | ||
friend class InputFactory; | ||
public: | ||
|
||
CTaxInput(); | ||
|
||
virtual ~CTaxInput(); | ||
|
||
virtual CTaxInput* clone() const; | ||
|
||
static const std::string& getXMLNameStatic(); | ||
|
||
virtual const std::string& getXMLReportingName() const; | ||
|
||
virtual void XMLParse( const xercesc::DOMNode* aNode ); | ||
|
||
virtual bool isSameType( const std::string& aType ) const; | ||
|
||
virtual void toInputXML( std::ostream& aOut, | ||
Tabs* aTabs ) const; | ||
|
||
virtual void toDebugXML( const int aPeriod, | ||
std::ostream& aOut, | ||
Tabs* aTabs ) const; | ||
|
||
virtual void copyParam( const IInput* aInput, | ||
const int aPeriod ); | ||
|
||
virtual void completeInit( const std::string& aRegionName, | ||
const std::string& aSectorName, | ||
const std::string& aSubsectorName, | ||
const std::string& aTechName, | ||
const IInfo* aTechInfo ); | ||
|
||
virtual void initCalc( const std::string& aRegionName, | ||
const std::string& aSectorName, | ||
const bool aIsNewInvestmentPeriod, | ||
const bool aIsTrade, | ||
const IInfo* aTechInfo, | ||
const int aPeriod ); | ||
|
||
virtual double getCO2EmissionsCoefficient( const std::string& aGHGName, | ||
const int aPeriod ) const; | ||
|
||
virtual double getPhysicalDemand( const int aPeriod ) const; | ||
|
||
virtual double getCarbonContent( const int aPeriod ) const; | ||
|
||
virtual double getPrice( const std::string& aRegionName, | ||
const int aPeriod ) const; | ||
|
||
virtual void setPrice( const std::string& aRegionName, | ||
const double aPrice, | ||
const int aPeriod ); | ||
|
||
virtual void setPhysicalDemand( const double aPhysicalDemand, | ||
const std::string& aRegionName, | ||
const int aPeriod ); | ||
|
||
virtual double getCoefficient( const int aPeriod ) const; | ||
|
||
virtual void setCoefficient( const double aCoefficient, | ||
const int aPeriod ); | ||
|
||
virtual double getCalibrationQuantity( const int aPeriod ) const; | ||
|
||
virtual bool hasTypeFlag( const int aTypeFlag ) const; | ||
|
||
virtual double getIncomeElasticity( const int aPeriod ) const; | ||
|
||
virtual double getPriceElasticity( const int aPeriod ) const; | ||
|
||
virtual double getTechChange( const int aPeriod ) const; | ||
|
||
protected: | ||
CTaxInput( const CTaxInput& aOther ); | ||
|
||
// Define data such that introspection utilities can process the data from this | ||
// subclass together with the data members of the parent classes. | ||
DEFINE_DATA_WITH_PARENT( | ||
MiniCAMInput, | ||
|
||
//! The name of the fuel to use to look up the C coef | ||
//! typically the name of the primary input into the | ||
//! containing technology | ||
DEFINE_VARIABLE( SIMPLE, "fuel-name", mFuelName, std::string ), | ||
|
||
//! The C coef associated with mFuelName | ||
DEFINE_VARIABLE( SIMPLE, "fuel-C-coef", mCachedCCoef, double ) | ||
) | ||
}; | ||
|
||
#endif // _CTAX_INPUT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.