float NodeLevelHealthTriggeredIVScaleUpSwitch::getDemographicCoverage( ) const { float demographic_coverage = demographic_restrictions.GetDemographicCoverage(); float current_demographic_coverage = demographic_coverage; switch (demographic_coverage_time_profile) { case ScaleUpProfile::Immediate: LOG_DEBUG("ScaleUpProfile is Immediate, don't need to update demographic coverage by time \n"); current_demographic_coverage = demographic_coverage; break; case ScaleUpProfile::Linear: if (duration <= primary_time_constant) { //the increment amount is ((demographic_coverage - initial_demog_coverage)/primary_time_constant) per day current_demographic_coverage = initial_demographic_coverage + ( (demographic_coverage - initial_demographic_coverage)/primary_time_constant) * duration; LOG_DEBUG_F("ScaleUpProfile is Linear, duration is %f, rate of %f, coverage is %f \n", duration, ( (demographic_coverage - initial_demographic_coverage)/primary_time_constant), current_demographic_coverage); } else { current_demographic_coverage = demographic_coverage; } break; default: throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__, "Only Immediate and Linear supported currently. \n" ); break; } return current_demographic_coverage; }
QueryResult TBDrugTypeParameters::QueryInterface( iid_t iid, void **ppvObject ) { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__ ); }
void VectorInterventionsContainer::UpdateProbabilityOfIndRepKilling( float prob ) { if ( prob > 0 ) { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__, "Individual repellents only currently support blocking but not killing." ); } p_kill_indrep = prob; }
FlowGraphNode *irNodeGetEnclosingBlock(IRNode *Node) { throw NotYetImplementedException("irNodeGetEnclosingBlock"); }
EHRegion *irNodeGetRegion(IRNode *Node) { throw NotYetImplementedException("irNodeGetRegion"); }
void irNodeInsertAfter(IRNode *InsertionPointTuple, IRNode *NewNode) { throw NotYetImplementedException("irNodeInsertAfter"); }
void irNodeExceptSetMSILOffset(IRNode *BranchNode, uint32_t Offset) { throw NotYetImplementedException("irNodeExceptSetMSILOffset"); }
bool irNodeIsHandlerFlowAnnotation(IRNode *Node) { throw NotYetImplementedException("irNodeIsHandlerFlowAnnotation"); }
IRNode *branchListGetIRNode(BranchList *BranchList) { throw NotYetImplementedException("branchListGetIRNode"); }
bool irNodeIsBranch(IRNode *Node) { throw NotYetImplementedException("irNodeIsBranch"); }
IRNode *irNodeGetInsertPointBeforeMSILOffset(IRNode *Node, uint32_t Offset) { throw NotYetImplementedException("irNodeGetInsertPointBeforeMSILOffset"); }
void fgEdgeListMakeFake(FlowGraphEdgeList *FgEdge) { throw NotYetImplementedException("fgEdgeListMakeFake"); }
IRNode *irNodeGetNext(IRNode *Node) { throw NotYetImplementedException("irNodeGetNext"); }
uint32_t fgNodeGetBlockNum(FlowGraphNode *Fg) { throw NotYetImplementedException("fgNodeGetBlockNum"); }
void fgNodeSetGlobalVerifyData(FlowGraphNode *Fg, GlobalVerifyData *GvData) { throw NotYetImplementedException("fgNodeSetGlobalVerifyData"); }
GlobalVerifyData *fgNodeGetGlobalVerifyData(FlowGraphNode *Fg) { throw NotYetImplementedException("fgNodeGetGlobalVerifyData"); }
void ViewImpl::drawTriangle(const VecMath::Vector< 4 >&, const VecMath::Vector< 4 >&, const VecMath::Vector< 4 >&, const VecMath::Vector< 3 >&, const VecMath::Vector< 3 >&, const VecMath::Vector< 3 >&) { throw NotYetImplementedException("drawTriangle()"); }
void CalendarEventCoordinator::UpdateNodes( float dt ) { // Now issue events as they come up, including anything currently in the past or present while( parent->GetSimulationTime().time >= times_and_coverages.begin()->first) { int grandTotal = 0; int limitPerNode = -1; // intervention class names for informative logging std::ostringstream intervention_name; intervention_name << std::string( json::QuickInterpreter(intervention_config._json)["class"].As<json::String>() ); auto qi_as_config = Configuration::CopyFromElement( (intervention_config._json), "campaign" ); _di = InterventionFactory::getInstance()->CreateIntervention(qi_as_config); // including deeper information for "distributing" interventions (e.g. calendars) formatInterventionClassNames( intervention_name, &json::QuickInterpreter(intervention_config._json) ); // Only visit individuals if this is NOT an NTI. Check... // Check to see if intervention is an INodeDistributable... INodeDistributableIntervention *ndi = InterventionFactory::getInstance()->CreateNDIIntervention(qi_as_config); INodeDistributableIntervention *ndi2 = nullptr; LOG_DEBUG_F("[UpdateNodes] limitPerNode = %d\n", limitPerNode); for (auto nec : cached_nodes) { if (ndi) { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__ ); #if 0 ndi2 = InterventionFactory::getInstance()->CreateNDIIntervention( qi_as_config ); if(ndi2) { float duration = -1; if (times_and_coverages.size() > 1) { auto iter = times_and_coverages.end(); //A node-targeted intervention issued through the calender coordinator lasts until the next NDI. //Is there an overlap of one day here? Should there be a -1? duration = (float)(prev(iter,2)->first - prev(iter, 1)->first); } INodeDistributableInterventionParameterSetterInterface* pNDIPSI = nullptr; if (s_OK == ndi2->QueryInterface(GET_IID(INodeDistributableInterventionParameterSetterInterface), (void**)&pNDIPSI) ) { pNDIPSI->SetDemographicCoverage(times_and_coverages.begin()->second); pNDIPSI->SetMaxDuration(duration); } if (!ndi2->Distribute( nec, this ) ) { LOG_INFO_F("UpdateNodes() distributed '%s' intervention to node %d\n", intervention_name.str().c_str(), nec->GetId().data ); } ndi2->Release(); } #endif } else { try { // For now, distribute evenly across nodes. int totalIndivGivenIntervention = nec->VisitIndividuals( this, limitPerNode ); grandTotal += totalIndivGivenIntervention; LOG_INFO_F( "UpdateNodes() gave out %d interventions at node %d\n", totalIndivGivenIntervention, nec->GetId().data ); } catch( const json::Exception &e ) { throw GeneralConfigurationException( __FILE__, __LINE__, __FUNCTION__, e.what() ); } } } delete qi_as_config; qi_as_config = nullptr; times_and_coverages.erase(times_and_coverages.begin()); LOG_DEBUG_F("%d Distributions remaining from CalendarEventCoordinator\n", times_and_coverages.size()); if( times_and_coverages.empty() ) { LOG_DEBUG_F("Signaling for disposal of CalendarEventCoordinator\n"); distribution_complete = true; // we're done, signal disposal ok break; } } return; }
void ViewImpl::drawPolygon(const std::vector< VecMath::Vector< 4 > >&, const std::vector< VecMath::Vector< 3 > >&) { throw NotYetImplementedException("drawPolygon()"); }
const vector<vector<float>>& PairFormationParametersImpl::OrthogonalBasisForATranspose() const { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__, "OrthogonalBasisForATranspose() is not supported." ); }
IRNode * irNodeGetFirstLabelOrInstrNodeInEnclosingBlock(IRNode *HandlerStartNode) { throw NotYetImplementedException( "irNodeGetFirstLabelOrInstrNodeInEnclosingBlock"); }
BranchList *branchListGetNext(BranchList *BranchList) { throw NotYetImplementedException("branchListGetNext"); }
const vector<vector<float>>& PairFormationParametersImpl::AperpPseudoInverse() const { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__, "AperpPseudoInverse() is not supported." ); }
uint32_t irNodeGetMSILOffset(IRNode *Node) { throw NotYetImplementedException("irNodeGetMSILOffset"); }
const vector<float>& PairFormationParametersImpl::SingularValues() const { throw NotYetImplementedException( __FILE__, __LINE__, __FUNCTION__, "SingularValues() is not supported." ); }
void irNodeLabelSetMSILOffset(IRNode *Node, uint32_t LabelMSILOffset) { throw NotYetImplementedException("irNodeLabelSetMSILOffset"); }