Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
SimBiology (Sensitivity Analysis)

Subject: SimBiology (Sensitivity Analysis)

From: Jerry

Date: 20 Aug, 2012 21:37:11

Message: 1 of 6

Hello,

I am using following command lines to activate sensitivity analysis within SimBioloy. I expected to have all parameters (Ps) as an output within SimResult.Data, but I have only the species as an output.
--------------------------------------------------------------------------------
setactiveconfigset(bmw, bmwConf);
bmwConf.SolverOptions.SensitivityAnalysis = true;
set (bmwConf.SensitivityAnalysisOptions,'Outputs', ...
sbioselect(bmw, 'Type', 'species'));
Opts = bmwConf.SensitivityAnalysisOptions;
Ps = sbioselect(bmw, 'Type', 'parameter');
Opts.Inputs = [sbioselect(bmw, 'Type', 'species'); Ps];
----------------------------------------------------------------------------------
The SimResult.DataNames appears in this way:
'Species_1'
'Species_2'
.
'Species_n'
'd[Species_1]/d[Species_1]_0'
.
'd[Species_n]/d[Species_n]_0'

but, I would like to be:
'Species_1'
'Species_2'
.
'Species_n'
P1
P2
.
Pn
.
'd[Species_1]/d[Species_1]_0'
.
'd[Species_n]/d[Species_n]_0'

May someone let me know how I could modify these command lines to have also parameters as an output?

Thanks,

Jerry

Subject: SimBiology (Sensitivity Analysis)

From: Arthur Goldsipe

Date: 21 Aug, 2012 13:44:09

Message: 2 of 6

Hi Jerry,

First, let me make sure I'm understanding your question. You want to include the values of parameters in your simulation results, along with the species and the selected sensitivities. Is that correct?

If that's the case, you need to modify the StatesToLog property. (By default it only includes species and *non-constant* parameters.) Here's an example command that selects all species and all parameters and adds them to the StatesToLog property:

bmwConf.RuntimeOptions.StatesToLog = ...
[sbioselect(bmw, 'Type', 'species'); sbioselect(bmw, 'Type', 'parameter'];

-Arthur

"Jerry " <jerrycholo@gmail.com> wrote in message <k0uam7$96u$1@newscl01ah.mathworks.com>...
> Hello,
>
> I am using following command lines to activate sensitivity analysis within SimBioloy. I expected to have all parameters (Ps) as an output within SimResult.Data, but I have only the species as an output.
> --------------------------------------------------------------------------------
> setactiveconfigset(bmw, bmwConf);
> bmwConf.SolverOptions.SensitivityAnalysis = true;
> set (bmwConf.SensitivityAnalysisOptions,'Outputs', ...
> sbioselect(bmw, 'Type', 'species'));
> Opts = bmwConf.SensitivityAnalysisOptions;
> Ps = sbioselect(bmw, 'Type', 'parameter');
> Opts.Inputs = [sbioselect(bmw, 'Type', 'species'); Ps];
> ----------------------------------------------------------------------------------
> The SimResult.DataNames appears in this way:
> 'Species_1'
> 'Species_2'
> .
> 'Species_n'
> 'd[Species_1]/d[Species_1]_0'
> .
> 'd[Species_n]/d[Species_n]_0'
>
> but, I would like to be:
> 'Species_1'
> 'Species_2'
> .
> 'Species_n'
> P1
> P2
> .
> Pn
> .
> 'd[Species_1]/d[Species_1]_0'
> .
> 'd[Species_n]/d[Species_n]_0'
>
> May someone let me know how I could modify these command lines to have also parameters as an output?
>
> Thanks,
>
> Jerry

Subject: SimBiology (Sensitivity Analysis)

From: Jerry

Date: 21 Aug, 2012 14:17:05

Message: 3 of 6

Hi,

The short answer is no. I want to add the parameters along with species in sensitivity results.

Jerry

"Arthur Goldsipe" wrote in message <k103b9$f0g$1@newscl01ah.mathworks.com>...
> Hi Jerry,
>
> First, let me make sure I'm understanding your question. You want to include the values of parameters in your simulation results, along with the species and the selected sensitivities. Is that correct?
>
> If that's the case, you need to modify the StatesToLog property. (By default it only includes species and *non-constant* parameters.) Here's an example command that selects all species and all parameters and adds them to the StatesToLog property:
>
> bmwConf.RuntimeOptions.StatesToLog = ...
> [sbioselect(bmw, 'Type', 'species'); sbioselect(bmw, 'Type', 'parameter'];
>
> -Arthur
>
> "Jerry " <jerrycholo@gmail.com> wrote in message <k0uam7$96u$1@newscl01ah.mathworks.com>...
> > Hello,
> >
> > I am using following command lines to activate sensitivity analysis within SimBioloy. I expected to have all parameters (Ps) as an output within SimResult.Data, but I have only the species as an output.
> > --------------------------------------------------------------------------------
> > setactiveconfigset(bmw, bmwConf);
> > bmwConf.SolverOptions.SensitivityAnalysis = true;
> > set (bmwConf.SensitivityAnalysisOptions,'Outputs', ...
> > sbioselect(bmw, 'Type', 'species'));
> > Opts = bmwConf.SensitivityAnalysisOptions;
> > Ps = sbioselect(bmw, 'Type', 'parameter');
> > Opts.Inputs = [sbioselect(bmw, 'Type', 'species'); Ps];
> > ----------------------------------------------------------------------------------
> > The SimResult.DataNames appears in this way:
> > 'Species_1'
> > 'Species_2'
> > .
> > 'Species_n'
> > 'd[Species_1]/d[Species_1]_0'
> > .
> > 'd[Species_n]/d[Species_n]_0'
> >
> > but, I would like to be:
> > 'Species_1'
> > 'Species_2'
> > .
> > 'Species_n'
> > P1
> > P2
> > .
> > Pn
> > .
> > 'd[Species_1]/d[Species_1]_0'
> > .
> > 'd[Species_n]/d[Species_n]_0'
> >
> > May someone let me know how I could modify these command lines to have also parameters as an output?
> >
> > Thanks,
> >
> > Jerry

Subject: SimBiology (Sensitivity Analysis)

From: Arthur Goldsipe

Date: 21 Aug, 2012 22:32:08

Message: 4 of 6

Hi Jerry,

The answer I gave will give you DataNames like you requested in the original message. But it sounds like maybe you want something else. Can you clarify what you want in the simulation results?

In the meantime, maybe it would be helpful to talk about a specific example. For example, if your model consists of a single reaction:
  x1 -> x2
with reaction rate k*x1 (where k is a prameter, and x1 and x2 are species), you can get the values of x1, x2, and k during the simulation by setting StatesToLog to the following:
  [sbioselect(model, 'Type', 'species'); sbioselect(model, 'Type', 'parameter')]

You can get x1 and x2 in the numerator of the sensitivities by setting Outputs to
  sbioselect(model, 'Type', 'species')
and you can get x1_0, x2_0, and k in the denominator of the sensitivities by setting Inputs to
  [sbioselect(model, 'Type', 'species'); sbioselect(model, 'Type', 'parameter')]

-Arthur

"Jerry " <jerrycholo@gmail.com> wrote in message <k10591$n0v$1@newscl01ah.mathworks.com>...
> Hi,
>
> The short answer is no. I want to add the parameters along with species in sensitivity results.
>
> Jerry
>
> "Arthur Goldsipe" wrote in message <k103b9$f0g$1@newscl01ah.mathworks.com>...
> > Hi Jerry,
> >
> > First, let me make sure I'm understanding your question. You want to include the values of parameters in your simulation results, along with the species and the selected sensitivities. Is that correct?
> >
> > If that's the case, you need to modify the StatesToLog property. (By default it only includes species and *non-constant* parameters.) Here's an example command that selects all species and all parameters and adds them to the StatesToLog property:
> >
> > bmwConf.RuntimeOptions.StatesToLog = ...
> > [sbioselect(bmw, 'Type', 'species'); sbioselect(bmw, 'Type', 'parameter'];
> >
> > -Arthur
> >
> > "Jerry " <jerrycholo@gmail.com> wrote in message <k0uam7$96u$1@newscl01ah.mathworks.com>...
> > > Hello,
> > >
> > > I am using following command lines to activate sensitivity analysis within SimBioloy. I expected to have all parameters (Ps) as an output within SimResult.Data, but I have only the species as an output.
> > > --------------------------------------------------------------------------------
> > > setactiveconfigset(bmw, bmwConf);
> > > bmwConf.SolverOptions.SensitivityAnalysis = true;
> > > set (bmwConf.SensitivityAnalysisOptions,'Outputs', ...
> > > sbioselect(bmw, 'Type', 'species'));
> > > Opts = bmwConf.SensitivityAnalysisOptions;
> > > Ps = sbioselect(bmw, 'Type', 'parameter');
> > > Opts.Inputs = [sbioselect(bmw, 'Type', 'species'); Ps];
> > > ----------------------------------------------------------------------------------
> > > The SimResult.DataNames appears in this way:
> > > 'Species_1'
> > > 'Species_2'
> > > .
> > > 'Species_n'
> > > 'd[Species_1]/d[Species_1]_0'
> > > .
> > > 'd[Species_n]/d[Species_n]_0'
> > >
> > > but, I would like to be:
> > > 'Species_1'
> > > 'Species_2'
> > > .
> > > 'Species_n'
> > > P1
> > > P2
> > > .
> > > Pn
> > > .
> > > 'd[Species_1]/d[Species_1]_0'
> > > .
> > > 'd[Species_n]/d[Species_n]_0'
> > >
> > > May someone let me know how I could modify these command lines to have also parameters as an output?
> > >
> > > Thanks,
> > >
> > > Jerry

Subject: SimBiology (Sensitivity Analysis)

From: Sven Mesecke

Date: 22 Aug, 2012 07:15:12

Message: 5 of 6

Hi Jerry,
I understood your question in the same way as Arthur did and you could get this output:
> > > 'Species_1'
> > > 'Species_2'
> > > .
> > > 'Species_n'
> > > P1
> > > P2
> > > .
> > > Pn
> > > .
> > > 'd[Species_1]/d[Species_1]_0'
by using Arthur's approach. If that is not what you want, is it that you have dynamic (non-constant) parameters and would like to calculate their sensitivities as well?

Sven

Subject: SimBiology (Sensitivity Analysis)

From: Jerry

Date: 22 Aug, 2012 13:00:07

Message: 6 of 6

Understood, thanks...Jerry

"Arthur Goldsipe" wrote in message <k11298$gcb$1@newscl01ah.mathworks.com>...
> Hi Jerry,
>
> The answer I gave will give you DataNames like you requested in the original message. But it sounds like maybe you want something else. Can you clarify what you want in the simulation results?
>
> In the meantime, maybe it would be helpful to talk about a specific example. For example, if your model consists of a single reaction:
> x1 -> x2
> with reaction rate k*x1 (where k is a prameter, and x1 and x2 are species), you can get the values of x1, x2, and k during the simulation by setting StatesToLog to the following:
> [sbioselect(model, 'Type', 'species'); sbioselect(model, 'Type', 'parameter')]
>
> You can get x1 and x2 in the numerator of the sensitivities by setting Outputs to
> sbioselect(model, 'Type', 'species')
> and you can get x1_0, x2_0, and k in the denominator of the sensitivities by setting Inputs to
> [sbioselect(model, 'Type', 'species'); sbioselect(model, 'Type', 'parameter')]
>
> -Arthur
>
> "Jerry " <jerrycholo@gmail.com> wrote in message <k10591$n0v$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > The short answer is no. I want to add the parameters along with species in sensitivity results.
> >
> > Jerry
> >
> > "Arthur Goldsipe" wrote in message <k103b9$f0g$1@newscl01ah.mathworks.com>...
> > > Hi Jerry,
> > >
> > > First, let me make sure I'm understanding your question. You want to include the values of parameters in your simulation results, along with the species and the selected sensitivities. Is that correct?
> > >
> > > If that's the case, you need to modify the StatesToLog property. (By default it only includes species and *non-constant* parameters.) Here's an example command that selects all species and all parameters and adds them to the StatesToLog property:
> > >
> > > bmwConf.RuntimeOptions.StatesToLog = ...
> > > [sbioselect(bmw, 'Type', 'species'); sbioselect(bmw, 'Type', 'parameter'];
> > >
> > > -Arthur
> > >
> > > "Jerry " <jerrycholo@gmail.com> wrote in message <k0uam7$96u$1@newscl01ah.mathworks.com>...
> > > > Hello,
> > > >
> > > > I am using following command lines to activate sensitivity analysis within SimBioloy. I expected to have all parameters (Ps) as an output within SimResult.Data, but I have only the species as an output.
> > > > --------------------------------------------------------------------------------
> > > > setactiveconfigset(bmw, bmwConf);
> > > > bmwConf.SolverOptions.SensitivityAnalysis = true;
> > > > set (bmwConf.SensitivityAnalysisOptions,'Outputs', ...
> > > > sbioselect(bmw, 'Type', 'species'));
> > > > Opts = bmwConf.SensitivityAnalysisOptions;
> > > > Ps = sbioselect(bmw, 'Type', 'parameter');
> > > > Opts.Inputs = [sbioselect(bmw, 'Type', 'species'); Ps];
> > > > ----------------------------------------------------------------------------------
> > > > The SimResult.DataNames appears in this way:
> > > > 'Species_1'
> > > > 'Species_2'
> > > > .
> > > > 'Species_n'
> > > > 'd[Species_1]/d[Species_1]_0'
> > > > .
> > > > 'd[Species_n]/d[Species_n]_0'
> > > >
> > > > but, I would like to be:
> > > > 'Species_1'
> > > > 'Species_2'
> > > > .
> > > > 'Species_n'
> > > > P1
> > > > P2
> > > > .
> > > > Pn
> > > > .
> > > > 'd[Species_1]/d[Species_1]_0'
> > > > .
> > > > 'd[Species_n]/d[Species_n]_0'
> > > >
> > > > May someone let me know how I could modify these command lines to have also parameters as an output?
> > > >
> > > > Thanks,
> > > >
> > > > Jerry

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us