Do not print non optimizing behaviour field in PAC if empty.
parent
ac850f5187
commit
adbeb49b29
|
@ -8430,8 +8430,10 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
output << " ";
|
output << " ";
|
||||||
output << it->second.second;
|
output << it->second.second;
|
||||||
}
|
}
|
||||||
output << "];" << endl
|
output << "];" << endl;
|
||||||
<< "M_.pac." << model_name << ".non_optim.params = [";
|
if (!params_vars_and_scaling_factor.empty())
|
||||||
|
{
|
||||||
|
output << "M_.pac." << model_name << ".non_optimizing_behaviour.params = [";
|
||||||
for (auto it = params_vars_and_scaling_factor.begin();
|
for (auto it = params_vars_and_scaling_factor.begin();
|
||||||
it != params_vars_and_scaling_factor.end(); it++)
|
it != params_vars_and_scaling_factor.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -8442,8 +8444,8 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
else
|
else
|
||||||
output << "NaN";
|
output << "NaN";
|
||||||
}
|
}
|
||||||
output << "];" << endl
|
output << "];"
|
||||||
<< "M_.pac." << model_name << ".non_optim.vars = [";
|
<< "M_.pac." << model_name << ".non_optimizing_behaviour.vars = [";
|
||||||
for (auto it = params_vars_and_scaling_factor.begin();
|
for (auto it = params_vars_and_scaling_factor.begin();
|
||||||
it != params_vars_and_scaling_factor.end(); it++)
|
it != params_vars_and_scaling_factor.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -8452,7 +8454,7 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
output << datatree.symbol_table.getTypeSpecificID(it->second.first.first) + 1;
|
output << datatree.symbol_table.getTypeSpecificID(it->second.first.first) + 1;
|
||||||
}
|
}
|
||||||
output << "];" << endl
|
output << "];" << endl
|
||||||
<< "M_.pac." << model_name << ".non_optim.lags = [";
|
<< "M_.pac." << model_name << ".non_optimizing_behaviour.lags = [";
|
||||||
for (auto it = params_vars_and_scaling_factor.begin();
|
for (auto it = params_vars_and_scaling_factor.begin();
|
||||||
it != params_vars_and_scaling_factor.end(); it++)
|
it != params_vars_and_scaling_factor.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -8461,7 +8463,7 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
output << it->second.first.second;
|
output << it->second.first.second;
|
||||||
}
|
}
|
||||||
output << "];" << endl
|
output << "];" << endl
|
||||||
<< "M_.pac." << model_name << ".non_optim.scaling_factor = [";
|
<< "M_.pac." << model_name << ".non_optimizing_behaviour.scaling_factor = [";
|
||||||
for (auto it = params_vars_and_scaling_factor.begin();
|
for (auto it = params_vars_and_scaling_factor.begin();
|
||||||
it != params_vars_and_scaling_factor.end(); it++)
|
it != params_vars_and_scaling_factor.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -8469,8 +8471,9 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
output << " ";
|
output << " ";
|
||||||
output << it->second.second;
|
output << it->second.second;
|
||||||
}
|
}
|
||||||
output << "];" << endl
|
output << "];" << endl;
|
||||||
<< "M_.pac." << model_name << ".h0_param_indices = [";
|
}
|
||||||
|
output << "M_.pac." << model_name << ".h0_param_indices = [";
|
||||||
for (auto it = h0_indices.begin();
|
for (auto it = h0_indices.begin();
|
||||||
it != h0_indices.end(); it++)
|
it != h0_indices.end(); it++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue