4 %Function returns the output which should be optimized.
5 %It performs a detailed/reduced simulation (considering varagin = reduced_data or detailed_data)
for the mu set in model and returns the
6 %output (the average concentration in the lower right quadrant).
8 % in the
struct data additional data can be returned
10 % Markus Dihlmann 04.02.2010
13 if isfield(varargin{1},
'grid')
14 model_data = varargin{1};
17 %
if (mu(1)<0)||(mu(1)>1)||(mu(2)<0)||(mu(2)>1)
22 %perform detailed simulation with actual parameter set
23 model.compute_derivative_info = 0;
24 sim_data = detailed_simulation(model,model_data);
29 disp(
'detailed simulation output result:')
34 reduced_data = varargin{1};
35 %perform reduced simulation
38 %
if (mu(1)<0)||(mu(1)>1)||(mu(2)<0)||(mu(2)>1)
43 model.compute_derivative_info = 0;
44 sim_data =rb_simulation(model, reduced_data);
45 %
if isempty(model_data)
46 % model_data = gen_model_data(model);
48 %disp(
'rewrite lin_evol_get_output for faster evaluation');
49 % sim_data = model.rb_reconstruction(model, model_data, detailed_data, sim_data);
53 disp(
'reduced simulation output result:')
57 data.nRB = sim_data.nRB;
function y = lin_evol_get_output_detailed(model, varargin)
lin_evol_get_output_detailed(model, varargin)
function model = set_mu_to_optimize(model, x, varargin)
Funcion sets the parameters that are to be optimized to the values given by x Also usable for optimiz...
function [ y , data ] = lin_evol_get_output(model, varargin)
lin_evol_get_output_detailed(model, varargin)