summaryrefslogtreecommitdiff
path: root/fitness.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2012-11-08 17:15:02 -0500
committerMatt Argao <mcargao@email.wm.edu>2012-11-08 17:15:02 -0500
commit7890155ab9f1808cbbd0295057274c003e8cefdd (patch)
tree601d642d0ef4d4bbe190d4e154bc804a6cb91900 /fitness.m
parentf794847d6069037e66e4e80359c531548d3bbd27 (diff)
parentb046d548e73259fcfd74e6b01b0440441e4c8b07 (diff)
downloadmode_match-7890155ab9f1808cbbd0295057274c003e8cefdd.tar.gz
mode_match-7890155ab9f1808cbbd0295057274c003e8cefdd.zip
Merge branch 'exper'
Conflicts: fitness.m mode_match.m
Diffstat (limited to 'fitness.m')
-rw-r--r--fitness.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/fitness.m b/fitness.m
index 00cbada..752e748 100644
--- a/fitness.m
+++ b/fitness.m
@@ -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;
+ Energy = 1e-2*Penalty_waist_mismatch;
% penalty calculation
% do not put lenses too close to each other and end positions