Skip to content

Commit 1394535

Browse files
committed
fixed issue with loading strategies w/o statevars
1 parent 85f5404 commit 1394535

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SimpleTree.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ SimpleTree SimpleTree::parse(std::istream& input, bool simplify, bool subsumptio
9191
for(auto it = regressors.begin(); it != regressors.end(); ++it)
9292
{
9393
auto key = parse_key(it.key());
94-
if(key.size() != tree._statevars.size())
94+
if(key.size() != tree._statevars.size() && (tree._statevars.size() != 0 || key[0] != 1.0))
9595
{
9696
std::cerr << it.key() << std::endl;
9797
std::cerr << key.size() << std::endl;
9898
std::cerr << tree._statevars.size() << std::endl;
9999
throw base_error("Expected cardinality of key does not match cardinality of statevars");
100100
}
101+
else if(tree._statevars.size() == 0)
102+
key.clear();
101103

102104

103105
if(!it.value().is_object())

0 commit comments

Comments
 (0)