C-Frost
C-Frost copied to clipboard
JacStructFuncs field missing in solver.Constraint and solver.Objective
On running both the examples, I get the following error:
Reference to non-existent field 'JacStructFuncs'.
Error in frost_c.formulateProblemStructure (line 63)
jac_pattern = feval(obj.Constraint.JacStructFuncs{i},0);
Error in frost_c.createDataFile (line 6)
obj = frost_c.formulateProblemStructure(solver, funcs);
Error in main_opt (line 141)
frost_c.createDataFile(solver, funcs, res_path, 'data');
It looks like the JacStructFuncs
field is missing in solver.Constraint
and solver.Objective
. I've fixed it for now by adding the following lines before the call to frost_c.createDataFile(solver, funcs, res_path, 'data');
in the main file:
for i = 1:length(solver.Constraint.JacFuncs)
solver.Constraint.JacStructFuncs{i} = [solver.Constraint.JacFuncs{i}(1),'s',solver.Constraint.JacFuncs{i}(2:end)];
end
for i = 1:length(solver.Objective.JacFuncs)
solver.Objective.JacStructFuncs{i} = [solver.Objective.JacFuncs{i}(1),'s',solver.Objective.JacFuncs{i}(2:end)];
end
Is there a better way to resolve this issue, or am I missing something?
Have you pulled the latest commits to FROST?