dollabs / pamela

Probabalistic Advanced Modeling and Execution Learning Architecture
Apache License 2.0
233 stars 15 forks source link

Temporal constraint not properly defined for some special cases #120

Closed dcerys closed 7 years ago

dcerys commented 7 years ago

For certain parallel blocks, the first statement doesn't seem to have a properly defined temporal constraint. In planviz, the constraint isn't shown. Looking at the TPN file, it appears that the parallel begin node has two constraints (one defined for the parallel statement, and one for that first statement in the parallel block), while that first statement has none.

See this example: https://github.com/dollabs/pamela/blob/master/test/pamela/pending/parallel-constraints.pamela

In this example, the problem occurs with the calls to a non-primitive method, but not to a primitive method.

Here is the suspect JSON:

"node-16":
 {"activities":["na-23", "na-33", "na-43", "na-63", "na-74", "na-53"],
  "constraints":["tc-9", "tc-13"],
  "end-node":"node-15",
  "htn-node":"hem-31",
  "incidence-set":[],
  "tpn-type":"p-begin",
  "uid":"node-16"},
 "node-22":
 {"activities":["act-21"],
  "constraints":["tc-13"],
  "htn-node":"hem-44",
  "incidence-set":["na-23"],
  "tpn-type":"state",
  "uid":"node-22"},

 "tc-13":
 {"end-node":"node-15",
  "tpn-type":"temporal-constraint",
  "uid":"tc-13",
  "value":[5, 10]},
pmdoll commented 7 years ago

This bug has creeped in surreptitiously. When this bug is resolved, this file should become part of the regression test.