Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: Container Registry, Job Artifacs,. Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 10e1093a authored by Markus Mirz's avatar Markus Mirz
Browse files

catch uninitialized field exception for RegulatingControl


Signed-off-by: Markus Mirz's avatarMarkus Mirz <mmirz@eonerc.rwth-aachen.de>
parent b61e18fd
......@@ -592,13 +592,19 @@ TopologicalPowerComp::Ptr Reader::mapExternalNetworkInjection(CIMPP::ExternalNet
auto cpsextnet = std::make_shared<SP::Ph1::NetworkInjection>(extnet->mRID, extnet->name, mComponentLogLevel);
cpsextnet->modifyPowerFlowBusType(PowerflowBusType::VD); // for powerflow solver set as VD component as default
cpsextnet->setBaseVoltage(baseVoltage);
if(extnet->RegulatingControl){
mSLog->info(" Voltage set-point={}", (float) extnet->RegulatingControl->targetValue);
cpsextnet->setParameters(extnet->RegulatingControl->targetValue*baseVoltage); // assumes that value is specified in CIM data in per unit
} else {
mSLog->info(" No voltage set-point defined. Using 1 per unit.");
cpsextnet->setParameters(1.*baseVoltage);
try {
if(extnet->RegulatingControl){
mSLog->info(" Voltage set-point={}", (float) extnet->RegulatingControl->targetValue);
cpsextnet->setParameters(extnet->RegulatingControl->targetValue*baseVoltage); // assumes that value is specified in CIM data in per unit
} else {
mSLog->info(" No voltage set-point defined. Using 1 per unit.");
cpsextnet->setParameters(1.*baseVoltage);
}
} catch (ReadingUninitializedField* e ) {
std::cerr << "Ignore incomplete RegulatingControl" << std::endl;
}
return cpsextnet;
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment