Commit 2c05373a authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

Merge branch 'powerPlantsXML' into HEAD

parents 699588ec 8feac32d
......@@ -90,12 +90,17 @@ double Biomass::getInvestCost() const
return m_nominalPower * m_specificInvestCost;
}
double Biomass::getAnnuityCost() const
{
return this->getInvestCost() * m_preferences->getAnnuityFactor(m_lifeTime);
}
double Biomass::getFixedOperationalCost() const
{
return 0.01 * m_specificFixedOperationalCost * getInvestCost();
}
double Biomass::getOperationalCost() const
double Biomass::getTotalOperationalCost() const
{
double totalOperationalCost = 0.;
for (int i = 0; i < m_load.size(); i++)
......
......@@ -42,8 +42,9 @@ public:
double getTotalCO2Seperated() const;
double getFullLoadHours() const;
double getInvestCost() const;
double getAnnuityCost() const;
double getFixedOperationalCost() const;
double getOperationalCost() const;
double getTotalOperationalCost() const;
//other
void clearResults();
......@@ -54,6 +55,7 @@ private:
double m_specificInvestCost; // Specific cost of plant in €/MW
double m_specificFixedOperationalCost; // Specific cost of O&M as usually fix part in relation to invest cost in %
double m_specificOperationalCost; // Specific O&M cost in €/MWh
int m_lifeTime; // life time; in a
// RESULTS //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
vector<double> m_load; //load that was produced in MW
......
This diff is collapsed.
#ifndef CSP_H
#define CSP_H
#include<string>
#include<vector>
#include<tuple>
#include<numeric>
#include<math.h>
#include<algorithm>
#include<iostream> // debugging cout
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
using namespace std;
///////////////////////////////////////////////////////////////////////////////////////////////////
///
/// Part of the CharL library
///
/// created : 05/2017
/// created by: Tobias Becke
/// filled with life by: Tobias Becke
/// _________________________________________________________________________________________________________
/// _______________________________________________________________________________________________
/// Change-Log:
/// [MM/YYYY] - [Name] - [Description]
/// 11/2019 - Gerrit Erichsen - Merging MA Ammon into this code and adapting to new structure
///
/// _________________________________________________________________________________________________________
/// _______________________________________________________________________________________________
/// Description:
/// This is a minimal representation of any concentrated solar power plant. Because of no
/// apparent need for the own research projects its target is to mainly be fast in calculation
/// and give a rough estimate. Should the result indicate anything close to competitiveness it
/// might make sense to check with other software. Additionally, it should be noted, that there is
/// a lack of data to validate against.
///
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <QVector>
#include <QFile>
#include "EfficiencyField.h"
#include "Location.h"
#include "SimulationPreferences.h"
using namespace std;
......@@ -38,103 +44,87 @@ using namespace std;
class CSP
{
public:
CSP(string name, QString efficiencyCurveSolarFieldFile, QString efficiencyCurveRecieverFile, QString efficiencyCurvePowerBlockFile, double netGeneratorPowerInMW,
double totalReflectiveHeliostatArea, double fullLoadStorageHours, double stateOfChargeInHours, const SimulationPreferences * preferences);
CSP(string name, double nominalPower,
double nominalReferencePower,
double referenceMirrorArea,
double solarMultiple,
double storageCapacity,
double storageLossFactor,
EfficiencyField & efficiencyCurveSolarField,
vector<pair<double, double>> & efficiencyCurveReceiver,
vector<pair<double, double>> & efficiencyCurvePowerBlock,
double specificInvestCostPower,
double specificInvestCostCapacity,
double specificFixedOaMCost,
double specificOaMCost,
int lifeTime,
const Location * location,
const SimulationPreferences * preferences,
double stowWindSpeed = 15.,
double relativePowerNeededForStartupReceiver = -1.,
double grossToNettoPowerFactor = 0.9,
double maxTimeToConsiderForHeating = 2.);
//get Funktionen
string getName() const {return m_name;}
double getInstalledPower() const {return m_installedCSPPower;}
double getStorageCapacityInMWht() const {return m_storageCapacityInMWhth;}
double getGrossToNetPowerFactor() const {return m_estimatedGrossToNetPowerFactor;}
double getTotalPowerPossiblyFedByPlant() const;
string getName() const;
double getInstalledPower() const;
double getStorageCapacity() const;
double getTotalEnergyPossiblyFedByPlant() const;
double getInvestCost() const;
double getAnnuityCost() const;
double getFixedOperationalCost() const;
double getFieldIncidentThermalPower(int step) const; //tb - CSP
double getFieldOpticalEfficiency(int step) const; //tb - CSP
double getPowerCycleEfficiencyGross(int step) const; //tb - CSP
double getPowerCycleElectricalOutputGross(int step) const; //tb - CSP
double getPowerCycleInputEnergy(int step) const; //tb - CSP
double getReceiverIncidentThermalPower(int step) const; //tb - CSP
double getReceiverEfficiency(int step) const; //tb - CSP
double getTESchargeStateInMWht(int step) const; //tb - CSP
double getTESchargePower(int step) const; //tb - CSP
double getTESdischargePower(int step) const; //tb - CSP
double getTESthermalLosses(int step) const; //tb - CSP
double getPowerOutputToGrid(int step) const; //tb - CSP
double getVariableOperationalCost() const;
double getTotalOperationalCost() const;
//CSP
double getPowerCSP(int timeStep, double windSpeedInMeterPerSecond, double teperaturesInDegreesCelsius, int dayTimeInSeconds, int dayOfYear, double dNI, double currentResidualLoadInMW, double timeStepSizeInHours);
double getPower(size_t timeStep, double currentResidual);
double getPowerFeedAtTimeStep(size_t timeStep) const;
double getStorageLevelAtTimeStep(size_t timeStep) const;
//other
void clearResults();
bool loadFile(QString fileName, QVector<std::pair<double,double>> & data);
private:
string m_name; //identifier of plant type
//power data
double m_nominalPower; // nominal net power of generator; in MW
double m_nominalReferencePower; // nominal net power of generator of reference plant; in MW
double m_referenceMirrorArea; // total effective (reflecting) mirror area; in m^2
double m_referenceReceiverPower; // maximum thermal power receiver can absorb in reference plant; in m^2
double m_receiverStartUpEnergy; // energy it takes to start up the receiver; in MWh
private:
string m_name;
double m_installedCSPPower; //AC peak power of plant installed in W
// --- CSP ---
QString m_efficiencyCurveSolarFieldFile;
QString m_efficiencyCurveRecieverFile;
QString m_grossEfficiencyCurvePowerBlockFile;
QVector<std::pair<double,double>> m_efficiencyCurveSolarFieldQt; // Efficiency of solar field;
QVector<std::pair<double,double>> m_efficiencyCurveReceiverQt; // Efficiency of reciever;
QVector<std::pair<double,double>> m_grossEfficiencyCurvePowerBlockQt; // Efficiency of power block;
vector<pair<double, double> > m_efficiencyCurveSolarField; // Efficiency of solar field;
vector<pair<double, double> > m_efficiencyCurveReceiver; // Efficiency of reciever;
vector<pair<double, double> > m_grossEfficiencyCurvePowerBlock; // Efficiency of power block;
double m_generatorPowerInMWelnet; // Nominal net power of generator in MW
double m_estimatedGrossToNetPowerFactor = 0.9; // Default from SAM = 0.9
double m_minimumRelativeGeneratorPower = 0.2; // Relative minimum Power of Powerblock, taken from SAM default = 0.2
double m_operationTemperaturePBdegC = 500.; //Default operation Temperature, Default: Nexant 500C HTF from SAM reference systems
double m_designPointTemperatureDegC = 42.; //Design point temperature, Default Germany = 32°C (MA Marius König), Default Dagget 42°C (SAM Default)
// tb -- fine tuning CSP plant --
bool m_enableStartupCosts = true;
bool m_enableParasiticLosses = true;
bool m_isAirCooledCondenser = true;
bool m_powerBlockHot = false;
bool m_receiverHot = false;
double m_storageCapacityInHours; // Storage capacity for full load of power cycle in hours
double m_storageCapacityInMWhth; // Storage capacity in MWh
double m_totalReflectiveHeliostatAreaInM2; // Sum of mirror area
double m_SOC; // State of charge of storage [0...1]
//ge --- storage
double m_storageCapacity; // storage capacity; in MWh_th
double m_storageLossFactor; // losses of storage; in %_capacity/h
//efficiency data
EfficiencyField m_efficiencyCurveSolarField; // efficiency of solar field; in - as a function of (x: sun azimuth in °, y: sun elevationAngle in °)
vector<pair<double, double>> m_efficiencyCurveReceiver; // efficiency of reciever; in - over - (first: relative power, second: efficiency)
vector<pair<double, double>> m_efficiencyCurvePowerBlock; // efficiency of power block; in - over - (first: relative power, second: efficiency)
//ge --- operational paramemter as in MA Ammon
double m_stowWindSpeed; // wind speed at above which mirrors have to be stowed away; in m/s
//ge --- other operational parameters
size_t m_nStepsWarmingUp; // number of timesteps to look back, to check if sufficient heating power is reached for receiver; in -
//ge --- economics ---
double m_specificInvestCost; // Specific cost of plant in €/MW
double m_specificFixedOperationalCost; // Specific cost of O&M as usually fix part in relation to invest cost in %
double m_specificInvestCostPower; // Specific invest cost of plant; in €/MW
double m_specificInvestCostCapacity; // Specific invest cost of storage; in €/MWh_th
double m_specificFixedOperationalCost; // Specific cost of O&M as usually fix part in relation to invest cost; in %_invest/a
double m_specificOperationalCost; // specific variable cost of O&M; in €/MWh_el,produced
int m_lifeTime; // life time of plant (works as depreciation period); in a
//ge --- result ---
vector<double> m_load; //Currently: load that could be produced (no knowledge of caps) in MW
//tb - CSP validation
vector<double> m_FieldIncidentThermalPower;
vector<double> m_FieldOpticalEfficiency;
vector<double> m_PowerCycleEfficiencyGross;
vector<double> m_PowerCycleElectricalOutputGross;
vector<double> m_PowerCycleInputEnergy;
// vector<double> m_PowerCycleStartupThermalEnergy; // used by SAM, not yet used by ReCon
// vector<double> m_ParasiticPowerTESandCycleHTFPump; // used by SAM, not yet used by ReCon
// vector<double> m_ReceiverConvectionAndEmissionLosses; // used by SAM, not yet used by ReCon
// vector<double> m_ReceiverHEaderAndTowerPipinglosses; // used by SAM, not yet used by ReCon
vector<double> m_ReceiverIncidentThermalPower;
// vector<double> m_ReceiverStartupThermalEnergy; // used by SAM, not yet used by ReCon
vector<double> m_ReceiverEfficiency;
vector<double> m_TESchargeStateInMWht;
vector<double> m_TESchargePower;
vector<double> m_TESdischargePower;
vector<double> m_TESthermalLosses;
vector<double> m_PowerOutputToGrid;
//ge PREFERENCES //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const SimulationPreferences * m_preferences;
vector<double> m_load; // load that "was" produced (no knowledge of caps, but residual was taken into account); in MW
vector<double> m_storageLevel; // State of charge of storage; in -
//ge LOCATION /////////////////////////////////////////
const Location * m_location; //location of plant
//ge PREFERENCES //////////////////////////////////////
const SimulationPreferences * m_preferences; //simulation preferecens (e.g. step time)
};
......
......@@ -6,12 +6,9 @@
#include <cmath>
#include <ctime>
//folgendes wieder Löschen
#include <QFile>
#include <QString>
#include <QStringList>
#include <QDebug>
//ende:folgendes wieder Löschen
#ifdef HAS_OPTIMIZATION
#include "OptimisationSchedule.h"
#endif
#include "InternalResult.h"
......@@ -53,37 +50,37 @@ void CharLAlgorithm::setPreferences(int nTimeSteps, double stepTime, int levelOf
useLastValueWhenConst, createForecast,
reworkOperationPlan, forecastType, foreCastIntervall,
foreCastPeriod, optimiserGap, optimiserTimeLimit,
storageLevelCurve, interestRate, deprecationPeriod,
storageLevelCurve, interestRate,
co2Costs, curtailmentCosts, optimiserTargetWeight,
optimization, fi);
}
void CharLAlgorithm::transferDemandData(int network, const vector<float> * powerDemand)
void CharLAlgorithm::transferDemandData(size_t node, const vector<float> * powerDemand)
{
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setPowerDemand(powerDemand);
m_networks[node]->setPowerDemand(powerDemand);
}
}
void CharLAlgorithm::transferDemandForecastData(int network,
void CharLAlgorithm::transferDemandForecastData(size_t node,
const vector<vector<float> > * powerDemand)
{
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setPowerDemandForecast(powerDemand);
m_networks[node]->setPowerDemandForecast(powerDemand);
}
}
void CharLAlgorithm::transferReactiveDemandData(int network, vector<float> reactivePowerDemand) //dv
void CharLAlgorithm::transferReactiveDemandData(size_t node, vector<float> reactivePowerDemand) //dv
{
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setReactivePowerDemand(reactivePowerDemand);
m_networks[node]->setReactivePowerDemand(reactivePowerDemand);
}
}
void CharLAlgorithm::transferPowerDemandToReactiveDemanddata(int network, vector<float> powerDemand)
void CharLAlgorithm::transferPowerDemandToReactiveDemanddata(size_t node, vector<float> powerDemand)
{
double PI = 3.14159265;
double fi = m_preferences->fi();
......@@ -95,9 +92,9 @@ void CharLAlgorithm::transferPowerDemandToReactiveDemanddata(int network, vector
}
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setReactivePowerDemand(powerDemand);
m_networks[node]->setReactivePowerDemand(powerDemand);
}
}
......@@ -253,21 +250,31 @@ void CharLAlgorithm::transferGridConfiguration(vector<vector<double> > lineCapac
m_grid = new Grid(lineCapacities, lineImpedances, lineInducitivity, m_networks, m_preferences);
}
int CharLAlgorithm::createNetwork(string name)
int CharLAlgorithm::createNode(string name)
{
m_networks.push_back(new Network(name, m_preferences));
return int(m_networks.size()) - 1;
}
void CharLAlgorithm::addConventionalPlant(int network, string name, double gradient, double nominalPower,
double co2, double actualCO2,
size_t CharLAlgorithm::createLocation(size_t node, string name, double lat, double lon, double areaSolar, double areaWind)
{
// hint: no consistency check (node availability)!
// create location
Location location(name, lat, lon, areaSolar, areaWind, m_preferences);
return m_networks[node]->addLocation(location);
}
void CharLAlgorithm::addConventionalPlant(size_t network, size_t location, string name, double gradient,
double nominalPower, double co2, double actualCO2,
vector<pair<double,double>> efficiencyCurve,
double timeCold, double timeWarm, double timeHot,
double minDownTime, double minUpTime,
double fuelCost, double investCost,
double fixedOM_Cost, double specOM_Cost,
double hotStartCost, double warmStartCost, double coldStartCost,
double hotStartEmissions, double warmStartEmissions, double coldStartEmissions)
double hotStartEmissions, double warmStartEmissions, double coldStartEmissions,
double temperatureCoefficient, string fuelType, int lifeTime) // bw: added from GUI
{
if (network < m_networks.size() && network >= 0)
{
......@@ -275,23 +282,26 @@ void CharLAlgorithm::addConventionalPlant(int network, string name, double gradi
timeCold, timeWarm, timeHot, minDownTime, minUpTime,
fuelCost, investCost, fixedOM_Cost, specOM_Cost,
hotStartCost, warmStartCost, coldStartCost,
hotStartEmissions, warmStartEmissions, coldStartEmissions, m_preferences);
hotStartEmissions, warmStartEmissions, coldStartEmissions,
temperatureCoefficient, fuelType, lifeTime, m_preferences); // bw: added from GUI
m_networks[network]->addConventionalPlant(dummy);
}
}
void CharLAlgorithm::addStoragePlant(size_t network, string name, double nominalPower, double capacity,
void CharLAlgorithm::addStoragePlant(size_t network, size_t location, string name,
double nominalPower, double capacity,
double gradientCharge, double gradientDischarge,
const EfficiencyField & efficiencyCharge, const EfficiencyField & efficiencyDischarge,
vector<pair<double, double>> selfDischarge,
const EfficiencyField &efficiencyCharge, const EfficiencyField &efficiencyDischarge,
vector<pair<double, double> > selfDischarge,
double startTimeHotCharge, double startTimeWarmCharge, double startTimeColdCharge,
double startTimeHotDischarge, double startTimeWarmDischarge, double startTimeColdDischarge,
double minDownTimeCharge, double minUpTimeCharge,
double minDownTimeDischarge, double minUpTimeDischarge,
double investCostPower, double investCostCapacity,
double fixedOM_Cost, double specOM_Cost,
double startCostHotCharge, double startCostWarmCharge, double startCostColdCharge,
double startCostHotDischarge, double startCostWarmDischarge, double startCostColdDischarge)
double investCostPowerCharge, double investCostPowerDischarge, double investCostCapacity,
double fixedOMCostCharge, double fixedOMCostDischarge, double specOMCostCharge,
double specOMCostDischarge, double startCostHotCharge, double startCostWarmCharge, double startCostColdCharge,
double startCostHotDischarge, double startCostWarmDischarge, double startCostColdDischarge,
int lifeTimeCharge, int lifeTimeDischarge, double typicalUnitSizeCharge, double typicalUnitSizeDischarge) // bw: added from GUI
{
if (network < m_networks.size())
{
......@@ -300,49 +310,70 @@ void CharLAlgorithm::addStoragePlant(size_t network, string name, double nominal
startTimeHotCharge, startTimeWarmCharge, startTimeColdCharge,
startTimeHotDischarge, startTimeWarmDischarge, startTimeColdDischarge,
minDownTimeCharge, minUpTimeCharge, minDownTimeDischarge, minUpTimeDischarge,
investCostPower, investCostCapacity, fixedOM_Cost, specOM_Cost,
investCostPowerCharge, investCostPowerDischarge, investCostCapacity, fixedOMCostCharge,
fixedOMCostDischarge, specOMCostCharge, specOMCostDischarge,
startCostHotCharge, startCostWarmCharge, startCostColdCharge,
startCostHotDischarge, startCostWarmDischarge, startCostColdDischarge,
m_preferences);
lifeTimeCharge, lifeTimeDischarge, typicalUnitSizeCharge, typicalUnitSizeDischarge,
m_preferences); // bw: added from GUI
m_networks[network]->addStoragePlant(dummy);
}
}
void CharLAlgorithm::addPvPlant(int network, string name, double areaPVModule, double pMPP, double nominalPowerOfPark, double tilt, double azimuth,
double groundCoverageRatio, double temperatureCoefficientInPercentPerK, vector<pair<double,double>> efficiencyCurveInverter,
vector<pair<double,double>> efficiencyCurvePVIrr, double investCost, double fixedOM_Cost)
void CharLAlgorithm::addPvPlant(size_t network, size_t location, string name, double installedPower,
double dcToAcRatio, double area, double temperatureLossCoefficient,
double modulePeakPower, double mppVoltage,
double ocVoltage, double scCurrent, double moduleLengthLongSide,
double moduleLengthShortSide,
const vector<pair<double,double>> & moduleEfficiency,
bool arePortraitOriented, double tiltInDeg, double azimuthInDeg,
double groundCoverageRatio,
const vector<pair<double,double>> & inverterEfficiency,
double specificInvestCost, double specificFixOaMcost, int lifeTime)
{
Solar dummy(name, areaPVModule, pMPP, nominalPowerOfPark, tilt, azimuth, groundCoverageRatio, efficiencyCurveInverter, efficiencyCurvePVIrr, temperatureCoefficientInPercentPerK, investCost, fixedOM_Cost, m_preferences);
Solar dummy(name, installedPower, dcToAcRatio, area, temperatureLossCoefficient, modulePeakPower, mppVoltage,
ocVoltage, scCurrent, moduleLengthLongSide, moduleLengthShortSide,
moduleEfficiency, arePortraitOriented, tiltInDeg,
azimuthInDeg, groundCoverageRatio, inverterEfficiency,
specificInvestCost, specificFixOaMcost, lifeTime,
m_networks.at(network)->getLocationPtr(location), m_preferences);
m_networks[network]->addSolarPlant(dummy);
}
void CharLAlgorithm::addWindPark(int network, string name, double nominalPowerOfPark, double hubHeight, double rotorDiameter, double areaOfPark, vector<pair<double,double>> powerCurve, vector<pair<double, double> > ctCurve, double investCost, double fixedOM_Cost, double specOM_Cost)
void CharLAlgorithm::addWindPark(size_t network, size_t location, string name,
double nominalPowerOfPark, double hubHeight, double rotorDiameter,
double areaOfPark, vector<pair<double,double>> powerCurve,
vector<pair<double, double> > ctCurve, double investCost,
double fixedOM_Cost, double specOM_Cost, int lifeTime)
{
if (network < m_networks.size() && network >= 0)
if (network < m_networks.size())
{
Wind dummy(name, nominalPowerOfPark, hubHeight, rotorDiameter, areaOfPark, powerCurve, ctCurve, investCost, fixedOM_Cost, specOM_Cost, m_preferences);
Wind dummy(name, nominalPowerOfPark, hubHeight, rotorDiameter, areaOfPark,
powerCurve, ctCurve, investCost, fixedOM_Cost, specOM_Cost, lifeTime,
m_networks.at(network)->getLocationPtr(location), m_preferences);
m_networks[network]->addWindPlant(dummy);
}
}
void CharLAlgorithm::setGenericWindCapacity(int network, double capacity)
void CharLAlgorithm::setGenericWindCapacity(size_t node, double capacity)
{
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setGenericWindCapacity(capacity);
m_networks[node]->setGenericWindCapacity(capacity);
}
}
void CharLAlgorithm::setGenericSolarCapacity(int network, double capacity)
void CharLAlgorithm::setGenericSolarCapacity(size_t node, double capacity)
{
if (network < m_networks.size() && network >= 0)
if (node < m_networks.size())
{
m_networks[network]->setGenericSolarCapacity(capacity);
m_networks[node]->setGenericSolarCapacity(capacity);
}
}
void CharLAlgorithm::run()
{
#ifdef HAS_OPTIMIZATION
//tz - total optimisations in rooling horizon
m_optimisationLoopTotal = m_preferences->getNumberOfTimeSteps() / m_preferences->getNumberOfStepsForeCastPeriod();
......@@ -352,6 +383,7 @@ void CharLAlgorithm::run()
{
m_optimisationLoopTotal++;
}
#endif
//******************************************
if (m_preferences->doCalculatePowerFlow())
......@@ -364,6 +396,7 @@ void CharLAlgorithm::run()
for (int i = 0; i < m_preferences->getNumberOfTimeSteps(); i++)
{
#ifdef HAS_OPTIMIZATION
//tz - optimize forecast if sep is start of interval
if (i == (m_optimisationLoopCounter * m_preferences->getNumberOfStepsForeCastPeriod())
&& m_preferences->createOperationPlan() == true
......@@ -376,9 +409,9 @@ void CharLAlgorithm::run()
{
nStepsInterval = m_preferences->getNumberOfTimeSteps() - m_optimisationLoopCounter * m_preferences->getNumberOfStepsForeCastPeriod();
}
qDebug() << "CHARL: ### OptimisationLoop #" << m_optimisationLoopCounter + 1 << "-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|";
optimizeForecast(nStepsInterval);
}
#endif
//calculateStoragePower(i);
calculateVolatile(i);
......@@ -414,7 +447,6 @@ void CharLAlgorithm::run()
m_networks[j]->restart();
}
i = -1;
qDebug() << "->->->->->->->->->->Restart<-<-<-<-<-<-<-<-<-<-<-";
cout << "->->->->->->->->->->Restart<-<-<-<-<-<-<-<-<-<-<-";
}
}
......@@ -628,7 +660,7 @@ void CharLAlgorithm::calculateGrid(int step) //dv
}
clock_t end = clock();
double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
qDebug() << "Elapsed: " << elapsed_secs;
cout << "Elapsed: " << elapsed_secs;
for (int i = 0; i < m_networks.size(); i++)
{
......
......@@ -27,7 +27,6 @@
#include "Network.h"
#include "Result.h"
#include "SimulationPreferences.h"
#include "OptimisationSchedule.h"
#include "Grid.h"
#include "EfficiencyField.h"
......@@ -46,12 +45,12 @@ public:
int foreCastPeriod, double optimiserGap, double optimiserTimeLimit, vector<double> storageLevelCurve,
double interestRate, int deprecationPeriod, double co2Costs, double curtailmentCosts, double optimiserTargetWeight, bool optimization, double fi);
void transferDemandData(int network,
void transferDemandData(size_t node,
const vector<float> * powerDemand);
void transferDemandForecastData(int network,
void transferDemandForecastData(size_t node,
const vector<vector<float>> * powerDemand);
void transferReactiveDemandData(int network, vector<float> reactivePowerDemand); //dv
void transferPowerDemandToReactiveDemanddata(int network, vector<float> powerDemand); //dv
void transferReactiveDemandData(size_t node, vector<float> reactivePowerDemand); //dv
void transferPowerDemandToReactiveDemanddata(size_t node, vector<float> powerDemand); //dv
void transferWindData(int node,
const vector<float> * windData);
......@@ -90,8 +89,9 @@ public:
const vector<vector<float>> * temperatures);
void transferGridConfiguration(vector<vector<double>> lineCapacities, vector<vector<double>> lineImpedances, vector<vector<double>> lineInducitivity);
int createNetwork(string name);
void addConventionalPlant(int network, string name,
int createNode(string name); // former network
size_t createLocation(size_t node, string name, double lat , double lon, double areaSolar, double areaWind); // local in node
void addConventionalPlant(size_t network, size_t location, string name,
double gradient, double nominalPower,
double co2, double actualCO2,
vector<pair<double, double> > efficiencyCurve,
......@@ -99,8 +99,9 @@ public:
double minDownTime, double minUpTime,
double fuelCost, double investCost, double fixedOM_Cost, double specOM_Cost,
double hotStartCost, double warmStartCost, double coldStartCost,
double hotStartEmissions, double warmStartEmissions, double coldStartEmissions);
void addStoragePlant(size_t network, string name,
double hotStartEmissions, double warmStartEmissions, double coldStartEmissions,
double temperatureCoefficient, string fuelType, int lifeTime);
void addStoragePlant(size_t network, size_t location, string name,
double nominalPower, double capacity,
double gradientCharge, double gradientDischarge,