summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmack <dmack@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-17 23:23:22 +0000
committerdmack <dmack@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-12-17 23:23:22 +0000
commit242474893f2a2e17eaa986de29e35b1a6507aac0 (patch)
tree6937ff97fbf8e63a0011b8c5adb8c640e3a8d065
parent641829a67b4b6b2e6088af06f17111c8b0407e63 (diff)
downloadATCD-242474893f2a2e17eaa986de29e35b1a6507aac0.tar.gz
Wed Dec 17 23:21:30 UTC 2008 Daniel L.C. Mack <daniel.l.mack@vanderbilt.edu>
-rw-r--r--SA_POP/C2W/C2W_Demo.cpp2
-rw-r--r--SA_POP/ChangeLog13
-rw-r--r--SA_POP/Planner.cpp2
-rw-r--r--SA_POP/SANet/SANode.cpp20
4 files changed, 33 insertions, 4 deletions
diff --git a/SA_POP/C2W/C2W_Demo.cpp b/SA_POP/C2W/C2W_Demo.cpp
index b2fad0c0145..155bc74ff21 100644
--- a/SA_POP/C2W/C2W_Demo.cpp
+++ b/SA_POP/C2W/C2W_Demo.cpp
@@ -213,7 +213,7 @@ int main (int argc, char* argv[])
std::cin >> curTask;
std::cout << "Enter the Condition ID: ";
std::cin >> curEff;
- planner->setEff(curTask, curEff, -1);
+ //planner->(curTask, curEff, -1);
planner->replan(100);
}
diff --git a/SA_POP/ChangeLog b/SA_POP/ChangeLog
index 383f017d274..b5c8484b449 100644
--- a/SA_POP/ChangeLog
+++ b/SA_POP/ChangeLog
@@ -1,7 +1,18 @@
+Wed Dec 17 23:21:30 UTC 2008 Daniel L.C. Mack <daniel.l.mack@vanderbilt.edu>
+
+ * C2W/C2W_Demo.cpp:
+ Minor update to setting effect
+
+ * Planner.cpp:
+ Fixed typo
+
+ * SANet/SANode.cpp:
+ Check for changed condition value in CondNode::update()
+
Wed Dec 17 22:55:40 UTC 2008 Daniel L.C. Mack <daniel.l.mack@vanderbilt.edu>
* SAPOP_C2W.mwc:
- Added mwc for C2W.
+ Added mwc for C2W.
Wed Dec 17 22:53:31 UTC 2008 Daniel L.C. Mack <daniel.l.mack@vanderbilt.edu>
diff --git a/SA_POP/Planner.cpp b/SA_POP/Planner.cpp
index 7dcaab2fcd5..46af16a0cea 100644
--- a/SA_POP/Planner.cpp
+++ b/SA_POP/Planner.cpp
@@ -150,6 +150,7 @@ bool Planner::replan (size_t sa_max_steps, SA_POP::Goal goal)
// Run spreading activation.
this->sanet_->update (sa_max_steps);
+
// Set planning strategy goals and satisfy open conditions.
this->plan_strat_->set_goals (goal.goal_conds);
if (this->plan_strat_->satisfy_open_conds ()) {
@@ -526,6 +527,7 @@ TaskImplID Planner::get_impl_id (TaskInstID task_inst)
{
return this->working_plan_->get_impl_id(task_inst);
+}
//****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****
// update effect throws excepetion
//TODO: Add Update fucntions in SANet and SANode for updating the effect link.
diff --git a/SA_POP/SANet/SANode.cpp b/SA_POP/SANet/SANode.cpp
index 4a6e8b864db..76c346b0f95 100644
--- a/SA_POP/SANet/SANode.cpp
+++ b/SA_POP/SANet/SANode.cpp
@@ -1023,6 +1023,22 @@ bool CondNode::update (void)
NodeMap::iterator temp_node_iter;
+ // Make sure conditions/links in the network have not changed to bring
+ // max true/false probabilities below actual current values for condition.
+ if (this->true_prob_from_ == this->ID_ && this->true_prob_.probability != this->init_true_prob_) {
+ this->true_prob_.probability = this->init_true_prob_;
+ this->true_prob_.common.clear ();
+ this->true_prob_from_ = this->ID_;
+ // Update prob_changed_ flag.
+ prob_changed_ = true;
+ }
+ if (this->false_prob_from_ == this->ID_ && this->false_prob_.probability != 1 - this->init_true_prob_) {
+ this->false_prob_.probability = 1 - this->init_true_prob_;
+ this->false_prob_.common.clear ();
+ this->false_prob_from_ = this->ID_;
+ // Update prob_changed_ flag.
+ prob_changed_ = true;
+ }
// Check for change in probability of node where current
// highest true probability comes from. Update true
@@ -1264,8 +1280,8 @@ bool CondNode::update (void)
}
//****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****TEMP****
- // Make sure conditions/links in the network have not changed to bring
- // max true/false probabilities below actual current values for condition.
+ // If max true/false probability is less than current (real-world)
+ // true/false probability, update to current value.
if (this->true_prob_.probability < this->init_true_prob_) {
this->true_prob_.probability = this->init_true_prob_;
this->true_prob_.common.clear ();