Skip to content

Commit

Permalink
Fix bug on exporting index to value for vnnlib
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Dec 21, 2023
1 parent d13897d commit 044b59a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/nnv/engine/utils/export2vnnlib.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ function export2vnnlib(lb, ub, outsize, property, name)
% Outputs a string to write in the vnnlib file

locs = find(hRow ~= 0); % Find indexes that are not zero
if hVal == 0 % Compare two indexes
if length(locs) > 1
if hVal ~= 0 % Compare two indexes
error("Only allowed index to index comparison, or 1 index to value, but not both.")
end
if hRow(locs(1)) > 0 %
str = "(>= Y_"+string(locs(2)-1) + " " + "Y_"+string(locs(1)-1)+ "))";
else
Expand Down

0 comments on commit 044b59a

Please sign in to comment.