Skip to content

Commit

Permalink
Rename submission and clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Jan 29, 2020
1 parent af29f37 commit 9d1b3d8
Show file tree
Hide file tree
Showing 27 changed files with 5 additions and 332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

%% Load all components
% Load controller (NN)
load controller_10_20.mat;
load controller_3_20.mat;
weights = network.weights;
bias = network.bias;
n = length(weights);
Expand Down Expand Up @@ -36,7 +36,7 @@
% x = [x_lead v_lead x_internal_lead x_ego v_ego x_internal_ego]'

lb = [94; 32; 0; 10; 30; 0];
ub = [96; 32.2; 0; 11; 30.2; 0];
ub = [95; 32.2; 0; 11; 30.2; 0];

init_set = Star(lb, ub);

Expand Down Expand Up @@ -86,24 +86,14 @@

%% Plot results

% plot velocity, distance, safe_distance versus time
figure;
% subplot 1
subplot(2, 1, 1);
Star.plotRanges_2D(ego_vel, 1, times, 'blue'); % plot ego car's velocity versus time
hold on;
Star.plotRanges_2D(lead_vel, 1, times, 'green'); % plot ego car's velocity versus time
xlabel('Time (s)');
ylabel('Velocity (m/s)');
title('Ego (blue) and lead (green) car velocities');

% subplot 2
subplot(2, 1, 2);
Star.plotRanges_2D(dis, 1, times, 'blue'); % plot distance between two cars versus time
hold on;
Star.plotRanges_2D(safe_dis, 1, times, 'red'); % plot safe distance versus time
hold on;
xlabel('Time (s)');
ylabel('Distance (m)');
title('Actual distance (blue) vs. safe distance (red)');
% saveas(gcf, 'reachSet.pdf');
grid;
set(gca,'FontSize',13)
saveas(gcf, 'reachSet.png');
149 changes: 0 additions & 149 deletions code/nnv/examples/Submission/DESTION2020/Reach1.m

This file was deleted.

168 changes: 0 additions & 168 deletions code/nnv/examples/Submission/DESTION2020/Reach3_discrete.m

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9d1b3d8

Please sign in to comment.