aboutsummaryrefslogtreecommitdiff
path: root/fitness.m
diff options
context:
space:
mode:
authorMatt Argao <mcargao@email.wm.edu>2012-10-23 15:40:28 -0400
committerMatt Argao <mcargao@email.wm.edu>2012-10-23 15:40:28 -0400
commit29f10e82fcff18e60bdb42cc824b2e18a40887bf (patch)
tree555904561cf28b736089bc088cd2a4311cb9125a /fitness.m
parent80b72a51a3f8f0e33bf79a20a4d5fbaca050d920 (diff)
downloadmode_match-29f10e82fcff18e60bdb42cc824b2e18a40887bf.tar.gz
mode_match-29f10e82fcff18e60bdb42cc824b2e18a40887bf.zip
Improved optimization
Removes repeating optic sets Stores possible solutions Returns waist from fitness function Solutions with same significant digits are truncated Visualize possible solutions Outputs solutions with a fitness threshold
Diffstat (limited to 'fitness.m')
-rw-r--r--fitness.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/fitness.m b/fitness.m
index 80835e5..c92d734 100644
--- a/fitness.m
+++ b/fitness.m
@@ -1,9 +1,10 @@
-function Energy = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length )
+function [Energy, Waist] = fitness( q_0, q_final, x_final, optics_positions, optics_focal_length, lambda )
%FITNESS Summary of this function goes here
% Detailed explanation goes here
x0 = 0;
q_f_trial = gbeam_propagation(x_final,q_0,x0,optics_placer(optics_positions, optics_focal_length));
-
+ [Waist, Radius] = q2wr(q_f_trial, lambda);
+
Energy = abs(q_final-q_f_trial);
% penalty calculation