Skip to content

Commit

Permalink
Added MATLAB binding for the new FBC variables
Browse files Browse the repository at this point in the history
  • Loading branch information
skeating authored and fbergmann committed Sep 21, 2023
1 parent 9faec63 commit fee56c9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/bindings/matlab/getDefaultValues.m
Original file line number Diff line number Diff line change
Expand Up @@ -3330,14 +3330,15 @@
'', ...
'', ...
'', ...
'', ...
0/0, ...
int32(0), ...
'', ...
int32(3), ...
int32(version), ...
int32(3), ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3566,7 +3567,7 @@
'', ...
'', ...
'', ...
int32(0), ...
'', ...
'', ...
'', ...
int32(3), ...
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/matlab/getStructureEnum.m
Original file line number Diff line number Diff line change
Expand Up @@ -3005,14 +3005,15 @@
{'fbc_id', 'id', 'fbc', 1, 20}, ...
{'fbc_name', 'name', 'fbc', 1, 20}, ...
{'fbc_reaction', 'reaction', 'fbc', 1, 20}, ...
{'fbc_reaction2', 'reaction2', 'fbc', 1, 20}, ...
{'fbc_coefficient', 'coefficient', 'fbc', 1, 20}, ...
{'isSetfbc_coefficient', 'coefficient', 'fbc', 0, 7}, ...
{'fbc_variableType', 'variableType', 'fbc', 1, 20}, ...
{'level', '', '', 0, 0}, ...
{'version', '', '', 0, 0}, ...
{'fbc_version', 'version', 'fbc', 1, 20}, ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3241,8 +3242,8 @@
{'fbc_id', 'id', 'fbc', 1, 20}, ...
{'fbc_name', 'name', 'fbc', 1, 20}, ...
{'fbc_coefficient', 'coefficient', 'fbc', 1, 20}, ...
{'isSetfbc_coefficient', 'coefficient', 'fbc', 0, 7}, ...
{'fbc_variable', 'variable', 'fbc', 1, 20}, ...
{'fbc_variable2', 'variable2', 'fbc', 1, 20}, ...
{'fbc_variableType', 'variableType', 'fbc', 1, 20}, ...
{'level', '', '', 0, 0}, ...
{'version', '', '', 0, 0}, ...
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/matlab/getStructureFieldnames.m
Original file line number Diff line number Diff line change
Expand Up @@ -3382,14 +3382,15 @@
'fbc_id', ...
'fbc_name', ...
'fbc_reaction', ...
'fbc_reaction2', ...
'fbc_coefficient', ...
'isSetfbc_coefficient', ...
'fbc_variableType', ...
'level', ...
'version', ...
'fbc_version', ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3618,8 +3619,8 @@
'fbc_id', ...
'fbc_name', ...
'fbc_coefficient', ...
'isSetfbc_coefficient', ...
'fbc_variable', ...
'fbc_variable2', ...
'fbc_variableType', ...
'level', ...
'version', ...
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/matlab/getValueType.m
Original file line number Diff line number Diff line change
Expand Up @@ -3333,14 +3333,15 @@
'char', ...
'char', ...
'char', ...
'char', ...
'double', ...
'bool', ...
'char', ...
'uint', ...
'uint', ...
'uint', ...
};
nNumberFields = 15;
nNumberFields = 16;
end
end
end
Expand Down Expand Up @@ -3569,7 +3570,7 @@
'char', ...
'char', ...
'char', ...
'bool', ...
'char', ...
'char', ...
'char', ...
'uint', ...
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/matlab/test/testReadFromFileFbc2.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).typecode, 'SBML_FBC_FLUXOBJECTIVE'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).fbc_reaction, 'R1'));
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).fbc_coefficient == 1);
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).isSetfbc_coefficient == 1);


Totalfail = Totalfail + fail_unless( strcmp(m.fbc_activeObjective, 'c'));

Expand Down
4 changes: 2 additions & 2 deletions src/bindings/matlab/test/testReadFromFileFbc3.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).typecode, 'SBML_FBC_FLUXOBJECTIVE'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_objective(1).fbc_fluxObjective(1).fbc_reaction, 'R1'));
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).fbc_coefficient == 1);
Totalfail = Totalfail + fail_unless( m.fbc_objective(1).fbc_fluxObjective(1).isSetfbc_coefficient == 1);


Totalfail = Totalfail + fail_unless( strcmp(m.fbc_activeObjective, 'c'));

Expand All @@ -77,7 +77,7 @@

Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).typecode, 'SBML_FBC_USERDEFINEDCONSTRAINTCOMPONENT'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_id, 'dd'));
Totalfail = Totalfail + fail_unless( m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).isSetfbc_coefficient == 1);

Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_coefficient, 'uc2ub'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_variable, 'R2'));
Totalfail = Totalfail + fail_unless( strcmp(m.fbc_userDefinedConstraint(1).fbc_userDefinedConstraintComponent(1).fbc_variableType, 'linear'));
Expand Down

0 comments on commit fee56c9

Please sign in to comment.