diff options
author | Matt Argao <mcargao@email.wm.edu> | 2012-11-08 16:37:21 -0500 |
---|---|---|
committer | Matt Argao <mcargao@email.wm.edu> | 2012-11-08 16:37:21 -0500 |
commit | a89dc9b6d1499bd446a5d36dd2252c98548e6a45 (patch) | |
tree | e43a7ea8e2c963c429d89b2a5e1ed90dfb22d3cc | |
parent | 9967bdc8f5c9ab51ea69cacdf694a3ddc5fd233e (diff) | |
download | mode_match-a89dc9b6d1499bd446a5d36dd2252c98548e6a45.tar.gz mode_match-a89dc9b6d1499bd446a5d36dd2252c98548e6a45.zip |
Changed # of shuffles & penalty weight
-rw-r--r-- | fitness.m | 8 | ||||
-rw-r--r-- | mode_match.m | 2 |
2 files changed, 4 insertions, 6 deletions
@@ -8,13 +8,11 @@ function [Energy, Waist, Penalty] = fitness( q_0, q_final, x_final, optics_posit [Waist_trial_forward, Radius_trial_forward] = q2wr(q_f_trial_forward, lambda);
q_f_trial_backward = gbeam_propagation(x,q_final,x_final,optics_placer(optics_positions, optics_focal_length));
[Waist_trial_backward, Radius_trial_backward] = q2wr(q_f_trial_backward, lambda);
-
+
Energy = 0;
Penalty_waist_mismatch = sum(abs((Waist_trial_forward-Waist_trial_backward)./min(Waist_trial_forward, Waist_trial_backward)))/Np;
- Penalty_waist_mismatch = 0*Penalty_waist_mismatch + 1e9*sum(abs((Waist_trial_forward-Waist_trial_backward)))/Np;
- Penalty_radius_mismatch = sum(abs((Radius_trial_forward-Radius_trial_backward)./max(Radius_trial_forward, Radius_trial_backward)))/Np;
-
- Energy = 0*Penalty_radius_mismatch + Penalty_waist_mismatch;
+ Penalty_waist_mismatch
+ Energy = 1e-2*Penalty_waist_mismatch;
% penalty calculation
% do not put lenses too close to each other and end positions
diff --git a/mode_match.m b/mode_match.m index 596cff1..b2d5f06 100644 --- a/mode_match.m +++ b/mode_match.m @@ -3,7 +3,7 @@ function [ possible_lens_placement, possible_lens_set, possible_sample_energy, n % Detailed explanation goes here n_perms = size(lens_permutations,1); -n_shuffles=1; %number of random placements of lenses +n_shuffles=20; %number of random placements of lenses %Initialize sample arrays N = n_perms * n_shuffles; |