Skip to content

Commit

Permalink
modified learn from run
Browse files Browse the repository at this point in the history
  • Loading branch information
forefire committed Sep 13, 2024
1 parent bea9ba4 commit 3f8ed09
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
21 changes: 21 additions & 0 deletions src/DataBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,27 @@ int DataBroker::getAltitude(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = altitudeLayer->getValueAt(fn);
return 1;
}

int DataBroker::getFirenodeLocX(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = fn->getLoc().getX();
return 1;
}

int DataBroker::getFirenodeLocY(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = fn->getLoc().getY();
return 1;
}

int DataBroker::getFirenodeID(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = fn->getID();
return 1;
}

int DataBroker::getFirenodeTime(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = fn->getTime();
return 1;
}

int DataBroker::getArrival_time_gradient(FireNode* fn, PropagationModel* model, int keynum) {
(model->properties)[keynum] = forcedArrivalTimeLayer->getValueAt(fn);
return 1;
Expand Down
14 changes: 13 additions & 1 deletion src/DataBroker.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ class DataBroker {
pgM["frontDepth"] = &getFrontDepth;
pgM["frontCurvature"] = &getFrontCurvature;
pgM["frontFastestInSection"] = &getFrontFastestInSection;
pgM["nodeLocationX"] = &getFirenodeLocX;
pgM["nodeLocationY"] = &getFirenodeLocY;
pgM["nodeID"] = &getFirenodeID,
pgM["nodeTime"] = &getFirenodeTime;
return pgM;
}
static const propGetterMap propPropertiesGetters; /*!< map to predefined functors to compute properties */
Expand Down Expand Up @@ -167,7 +171,15 @@ class DataBroker {
/*! \brief predefined function for getting the altitude for given firenode */
static int getAltitude(FireNode*, PropagationModel*, int);

static int getArrival_time_gradient(FireNode*, PropagationModel*, int);
static int getFirenodeLocX(FireNode *fn, PropagationModel *model, int keynum);

static int getFirenodeLocY(FireNode *fn, PropagationModel *model, int keynum);

static int getFirenodeID(FireNode *fn, PropagationModel *model, int keynum);

static int getFirenodeTime(FireNode *fn, PropagationModel *model, int keynum);

static int getArrival_time_gradient(FireNode*, PropagationModel*, int);
/*! \brief predefined function for getting the slope for given firenode */
static int getSlope(FireNode*, PropagationModel*, int);
/*! \brief predefined function for getting the longitudinal wind for given firenode */
Expand Down

0 comments on commit 3f8ed09

Please sign in to comment.