Skip to content

Commit

Permalink
update save starset for reachability analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshVU committed Sep 18, 2020
1 parent 8c50028 commit ab54edd
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 4 deletions.
7 changes: 6 additions & 1 deletion FFNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ def main():

simObj = FFNN(eng)
simObj.parseJson(str(jsonfile))
print(simObj.compute())
# print(simObj.compute())
result = simObj.compute()
print(result)
Strs = eng.getfield(result['reachability'], 'reachSet')
print(Strs)

# if simObj.doReach():
# result = simObj.invokeReachibility()

Expand Down
1 change: 1 addition & 0 deletions input/ContinuousLinearNNCS/LinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@

disp(R)
disp(reachTime)
save('starset.mat','R','-v7.3')

end
3 changes: 2 additions & 1 deletion input/ContinuousNonLinearNNCS/NonLinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
reachPRM.ref_input = [];
end
[R,reachTime] = nncs.reach(reachPRM); % Execute reachability analysis

save('starset.mat','R','-v7.3')

end


1 change: 1 addition & 0 deletions input/DiscreteLinearNNCS/DLinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
disp(reachTime)
disp(R)
disp('Finished reachability')
save('starset.mat','R','-v7.3')

end

1 change: 1 addition & 0 deletions input/DiscreteNonLinearNNCS/DNonLinear_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
[R,reachTime] = nncs.reach(reachPRM); % Execute reachability analysis

disp(R)
save('starset.mat','R','-v7.3')

end

Expand Down
3 changes: 2 additions & 1 deletion input/FFNN/FNN_template.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
result.reachSet = S;
result.t = t;
disp(result.reachSet)

save('starset.mat','S','-v7.3')

else
error('Unknown procedure for the verification of feed-forward neural networks')
end
Expand Down
1 change: 1 addition & 0 deletions templates/NNCS/DLinear/DLinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
disp(reachTime)
disp(R)
disp('Finished reachability')
save('starset.mat','R','-v7.3')

end

1 change: 1 addition & 0 deletions templates/NNCS/DNonlinear/DNonLinear_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
[R,reachTime] = nncs.reach(reachPRM); % Execute reachability analysis

disp(R)
save('starset.mat','R','-v7.3')

end

Expand Down
1 change: 1 addition & 0 deletions templates/NNCS/Linear/LinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@

disp(R)
disp(reachTime)
save('starset.mat','R','-v7.3')

end
3 changes: 2 additions & 1 deletion templates/NNCS/Nonlinear/NonLinearNNCS_reach.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
reachPRM.ref_input = [];
end
[R,reachTime] = nncs.reach(reachPRM); % Execute reachability analysis

save('starset.mat','R','-v7.3')

end


0 comments on commit ab54edd

Please sign in to comment.