+ All Categories
Home > Documents > Tomáš Hirmajer, Eva Balsa-Canto, and Julio R....

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R....

Date post: 25-Oct-2019
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
52
BRIEF T UTORIAL ON USING DOTCVP SB ( A MATLAB TOOLBOX FOR DYNAMIC OPTIMIZATION IN S YSTEMS BIOLOGY) Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga Process Engineering Group Instituto de Investigaciones Marinas [IIM-CSIC] Spanish Council for Scientific Research C/Eduardo Cabello 6, 36208 Vigo, Spain e-mails: {thirmajer, ebalsa, julio}@iim.csic.es All information about the toolbox is available at http://www.iim.csic.es/dotcvpsb/ or partial information is available at http://reven.comli.com/index4.html Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 1 / 43
Transcript
Page 1: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

BRIEF TUTORIAL ON USING DOTCVPSB

(A MATLAB TOOLBOX FOR DYNAMIC OPTIMIZATION IN SYSTEMS BIOLOGY)

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga

Process Engineering Group

Instituto de Investigaciones Marinas [IIM-CSIC]

Spanish Council for Scientific Research

C/Eduardo Cabello 6, 36208 Vigo, Spain

e-mails: {thirmajer, ebalsa, julio}@iim.csic.es

All information about the toolbox is available at

http://www.iim.csic.es/∼dotcvpsb/

or partial information is available at

http://reven.comli.com/index4.html

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 1 / 43

Page 2: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Outline

OUTLINE

1 DOTcvpSB: Key Features

2 Optimal Control Problems

3 NLP and MINLP Solvers, Solution Scheme

4 Single Optimization

5 Multistart

6 Sucessive Re-optimization

7 Hybrid Strategy

8 SBML to DOTcvpSB (dotcvp_sbml2dotcvpsb.m)

9 Simulation

10 GUI, a Graphical User Interface (dotcvp_gui.m)

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 2 / 43

Page 3: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Outline

OUTLINE

1 DOTcvpSB: Key Features

2 Optimal Control Problems

3 NLP and MINLP Solvers, Solution Scheme

4 Single Optimization

5 Multistart

6 Sucessive Re-optimization

7 Hybrid Strategy

8 SBML to DOTcvpSB (dotcvp_sbml2dotcvpsb.m)

9 Simulation

10 GUI, a Graphical User Interface (dotcvp_gui.m)

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 2 / 43

Page 4: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Brief information about the modules

BRIEF INFORMATION ABOUT THE MODULES

1 Single Optimization – For most problems is this approach sufficient, but if the problem is multimodal, or

high non-linear with many optimas, it is necessary to use an additional robust algorithm as, f.e. hybrid

approach.

2 Hybrid Strategy – Hybrid optimization is characterized by the combination of the deterministic local and

the stochastic global method for the convergence speed up. Deterministic local methods stand out with

their convergence speed into the nearest optimum, whereas the stochastic global methods are able to get

to the vicinity of the global optimum without the extensive computational cost in comparison to deterministic

global methods.

3 Sucessive Re-optimization – Sucessive re-optimization is assigned to speed up the convergence for the

problems with the high discretization level. At the beginning, the single optimization is run with relative low

amount of the time intervals. It follows that the total number of optimized variables is lower. At the end of

the optimization the amount of the time intervals is increased and the final values of the control variables

are used for the next single optimization initialization. This iterative approach speeds up the final

convergence of all optimizations.

4 SBML to DOTcvpSB – This module is able to import SBML models defined as XML files.

5 Simulation – Simulation module serves for problem simulation and state trajectories generation. It is useful

to use this module in combination, f.e. with sbml2dotcvp module to input check.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 3 / 43

Page 5: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Brief information about the modules

BRIEF INFORMATION ABOUT THE MODULES

1 Single Optimization – For most problems is this approach sufficient, but if the problem is multimodal, or

high non-linear with many optimas, it is necessary to use an additional robust algorithm as, f.e. hybrid

approach.

2 Hybrid Strategy – Hybrid optimization is characterized by the combination of the deterministic local and

the stochastic global method for the convergence speed up. Deterministic local methods stand out with

their convergence speed into the nearest optimum, whereas the stochastic global methods are able to get

to the vicinity of the global optimum without the extensive computational cost in comparison to deterministic

global methods.

3 Sucessive Re-optimization – Sucessive re-optimization is assigned to speed up the convergence for the

problems with the high discretization level. At the beginning, the single optimization is run with relative low

amount of the time intervals. It follows that the total number of optimized variables is lower. At the end of

the optimization the amount of the time intervals is increased and the final values of the control variables

are used for the next single optimization initialization. This iterative approach speeds up the final

convergence of all optimizations.

4 SBML to DOTcvpSB – This module is able to import SBML models defined as XML files.

5 Simulation – Simulation module serves for problem simulation and state trajectories generation. It is useful

to use this module in combination, f.e. with sbml2dotcvp module to input check.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 3 / 43

Page 6: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Brief information about the modules

BRIEF INFORMATION ABOUT THE MODULES

1 Single Optimization – For most problems is this approach sufficient, but if the problem is multimodal, or

high non-linear with many optimas, it is necessary to use an additional robust algorithm as, f.e. hybrid

approach.

2 Hybrid Strategy – Hybrid optimization is characterized by the combination of the deterministic local and

the stochastic global method for the convergence speed up. Deterministic local methods stand out with

their convergence speed into the nearest optimum, whereas the stochastic global methods are able to get

to the vicinity of the global optimum without the extensive computational cost in comparison to deterministic

global methods.

3 Sucessive Re-optimization – Sucessive re-optimization is assigned to speed up the convergence for the

problems with the high discretization level. At the beginning, the single optimization is run with relative low

amount of the time intervals. It follows that the total number of optimized variables is lower. At the end of

the optimization the amount of the time intervals is increased and the final values of the control variables

are used for the next single optimization initialization. This iterative approach speeds up the final

convergence of all optimizations.

4 SBML to DOTcvpSB – This module is able to import SBML models defined as XML files.

5 Simulation – Simulation module serves for problem simulation and state trajectories generation. It is useful

to use this module in combination, f.e. with sbml2dotcvp module to input check.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 3 / 43

Page 7: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Brief information about the modules

BRIEF INFORMATION ABOUT THE MODULES

1 Single Optimization – For most problems is this approach sufficient, but if the problem is multimodal, or

high non-linear with many optimas, it is necessary to use an additional robust algorithm as, f.e. hybrid

approach.

2 Hybrid Strategy – Hybrid optimization is characterized by the combination of the deterministic local and

the stochastic global method for the convergence speed up. Deterministic local methods stand out with

their convergence speed into the nearest optimum, whereas the stochastic global methods are able to get

to the vicinity of the global optimum without the extensive computational cost in comparison to deterministic

global methods.

3 Sucessive Re-optimization – Sucessive re-optimization is assigned to speed up the convergence for the

problems with the high discretization level. At the beginning, the single optimization is run with relative low

amount of the time intervals. It follows that the total number of optimized variables is lower. At the end of

the optimization the amount of the time intervals is increased and the final values of the control variables

are used for the next single optimization initialization. This iterative approach speeds up the final

convergence of all optimizations.

4 SBML to DOTcvpSB – This module is able to import SBML models defined as XML files.

5 Simulation – Simulation module serves for problem simulation and state trajectories generation. It is useful

to use this module in combination, f.e. with sbml2dotcvp module to input check.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 3 / 43

Page 8: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Brief information about the modules

BRIEF INFORMATION ABOUT THE MODULES

1 Single Optimization – For most problems is this approach sufficient, but if the problem is multimodal, or

high non-linear with many optimas, it is necessary to use an additional robust algorithm as, f.e. hybrid

approach.

2 Hybrid Strategy – Hybrid optimization is characterized by the combination of the deterministic local and

the stochastic global method for the convergence speed up. Deterministic local methods stand out with

their convergence speed into the nearest optimum, whereas the stochastic global methods are able to get

to the vicinity of the global optimum without the extensive computational cost in comparison to deterministic

global methods.

3 Sucessive Re-optimization – Sucessive re-optimization is assigned to speed up the convergence for the

problems with the high discretization level. At the beginning, the single optimization is run with relative low

amount of the time intervals. It follows that the total number of optimized variables is lower. At the end of

the optimization the amount of the time intervals is increased and the final values of the control variables

are used for the next single optimization initialization. This iterative approach speeds up the final

convergence of all optimizations.

4 SBML to DOTcvpSB – This module is able to import SBML models defined as XML files.

5 Simulation – Simulation module serves for problem simulation and state trajectories generation. It is useful

to use this module in combination, f.e. with sbml2dotcvp module to input check.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 3 / 43

Page 9: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

DOTcvpSB Toolbox Key Features

TOOLBOX KEY FEATURES

handling of a wide class of dynamic optimization problems, including constrained, unconstrained, fixed, and

free terminal time problems described by ordinary differential equations (ODEs), as well as continuous and

mixed integer decision variables;

the inner initial value problem (IVP) is solved using the state-of-the-art methods available in SUNDIALS;

the outer (MI)NLP problem can be solved using a number of advanced solvers, including local deterministic

methods, stochastic global optimization methods, and hybrid metaheuristics;

in addition to the traditional single optimization approach, the toolbox also offers more sophisticated

strategies, like multistart, sucessive re-optimization, and hybrid strategies;

a graphical user interface (GUI) which makes the definition and edition of a problem more easy and clear;

possibility of importing SBML models;

many output options for the results, including detailed figures.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 4 / 43

Page 10: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Optimal Control Problems Problem Definition

PROBLEM DEFINITION

Consider a dynamical system described by the vector of ordinary differential equations (ODEs)

x = f (t , x , u, p)

with given initial and terminal conditions

x(0) = x0, x(tF ) = xF

The aim is to find the optimal control policy ui , vector of the time-independent parameters p, and the final time tF ,

when minimum or free time problem is considered that minimizes the cost function J0

mintF ,ui ,p

J0 = G0(tF , xF , u, p)

subject to the constraints, introduced also in general Mayer form as the cost function

Jl = Gl(tF , xF , u, p), l = 1, me + mi

where me and mi represent the equality and inequality constraints, respectively. The bounds on the optimized

variables are given by

∆ti ∈ [∆t lower boundi , ∆t

upper boundi ]

ui ∈ [ulower boundi , u

upper boundi ]

p ∈ [plower bound, pupper bound]

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 5 / 43

Page 11: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

NLP and MINLP solvers MI/NLP Formulation

SOLUTION OF THE RESULTING NLP OR MINLP PROBLEMS

The dynamic optimization (DO) problem can be translated into a set of optimized variables

yT = [∆t1, . . . , ∆tN , uT1 , . . . , uT

N , p]

that can be handled by a suitable NLP or Mixed-Integer (MI) NLP solver.

The toolbox is able to interface following MI/NLP solvers

deterministic

IPOPT: Interior Point OPTimizer

FMINCON: Find MINimum of CONstrained nonlinear multivariable function

MISQP: Mixed-Integer Sequential Quadratic Programming

stochastic

DE: Differential Evolution

SRES: Stochastic Ranking Evolution Strategy

and hybrid

ACOMI: Ant Colony Optimization for Mixed Integer nonlinear programming problems

MITS: Mixed-Integer Tabu Search algorithm

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 6 / 43

Page 12: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

DOTcvpSB Scheme of the Solution of the Resulting NLP Problem

ALGORITHM SCHEME

FIGURE: DOTcvpSB solution scheme of the resulting dynamic optimization problem with sensitivity equations approach.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 7 / 43

Page 13: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

DOTcvpSB Organization of the Toolbox Code

CODE ORGANIZATION

FIGURE: Organization of the toolbox code.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 8 / 43

Page 14: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Single Optimization

SINGLE OPTIMIZATION

Single Optimization

THIS PROBLEM CAN BE RUN FROM THE TOOLBOX WITH THE FOLLOWING NAME

cdop_DrugDisplacementProblemA.m < input file with all options

midop_PhaseResettingOfCalciumOscillationsA.m

cdop_DrugDisplacementProblemA_simple.m < input file with minimum

midop_PhaseResettingOfCalciumOscillationsA_simple.m options, undefined options

are taken from the default

file

gui_DrugDisplacementProblemA.dotcvp < input file defined by the

DOTcvp graphical user

interface (GUI)

THE FILE WITH THE DEFAULT SETTINGS FOR THE PRESENTED MODULE IS THE FOLLOWING

dotcvp_single_optimization_default.m

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 9 / 43

Page 15: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Single Optimization

SINGLE OPTIMIZATION

Single Optimization

THIS PROBLEM CAN BE RUN FROM THE TOOLBOX WITH THE FOLLOWING NAME

cdop_DrugDisplacementProblemA.m < input file with all options

midop_PhaseResettingOfCalciumOscillationsA.m

cdop_DrugDisplacementProblemA_simple.m < input file with minimum

midop_PhaseResettingOfCalciumOscillationsA_simple.m options, undefined options

are taken from the default

file

gui_DrugDisplacementProblemA.dotcvp < input file defined by the

DOTcvp graphical user

interface (GUI)

THE FILE WITH THE DEFAULT SETTINGS FOR THE PRESENTED MODULE IS THE FOLLOWING

dotcvp_single_optimization_default.m

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 9 / 43

Page 16: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

EXAMPLE 1: DRUG DISPLACEMENT PROBLEM WITHOUT THE PATH CONSTRAINT

Example 1: Drug Displacement Problem without the path constraint

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 10 / 43

Page 17: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

PROBLEM DEFINITION

The problem consists of the right rate projection of phenylbutazone infusion to minimize the time needed to reach

in a patient’s bloodstream a desired level of two drugs

minui ,ti

J0{tF}

subject to

x1 = g4(g3(0.02 − x1) + 46.4x1(u − 2x2))

x2 = g4(g2(u − 2x2)) + 46.4(0.02 − x1)

with gi , i = 1, 4 defined as follows

g1 = 1 + 0.2(x1 + x2), g2 = g21 + 232 + 46.4x2, g3 = g2

1 + 232 + 46.4x1, g4 =g2

1

g2g3 − 2152.96x1x2

where the state variables represent the concentration of warfarin and phenylbutazone drugs. The initial values

were set for the process and decisions variables at the value of x0 = [0.02; 2.00] and u0 = [4], respectively. The

boundaries of the decision variables are as follows: u ∈ [0; 8].The equality point constraints on the final amount of displacement drugs are given by

x1(tF ) = 0.02, x2(tF ) = 2.00

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 11 / 43

Page 18: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

USER INPUT: PROBLEM AND IVP INITIALIZATION

1 clear mex; clear all; close all; global data;

2 % --------------------------------------------------- %

3 % Initialization:

4 % --------------------------------------------------- %

5 data.name = ’DrugDisplacementProblemA_simple’;

6

7 % --------------------------------------------------- %

8 % Settings for IVP (ODEs, sensitivities)

9 % --------------------------------------------------- %

10 data.odes.res(1) = {’((1+0.2*(y(1)+y(2)))^2/(((1+0.2*(y(1)+y(2)))^2+232+46.4*y(2)) *((1+0.2*(y(1)+y(2)))^2+232+46.4*y(1))

11 -2152.96*y(1)*y(2)))*(((1+0.2*(y(1)+y(2)))^2+232+46.4*y(1))*(0.02-y(1))+46.4*y(1)*(u(1)-2*y(2)))’};

12 data.odes.res(2) = {’((1+0.2*(y(1)+y(2)))^2/(((1+0.2*(y(1)+y(2)))^2+232+46.4*y(2)) *((1+0.2*(y(1)+y(2)))^2+232+46.4*y(1))

13 -2152.96*y(1)*y(2)))*(((1+0.2*(y(1)+y(2)))^2+232+46.4*y(2))*(u(1)-2*y(2))+46.4*(0.02-y(1)))’};

14 data.odes.res(3) = {’1’};

15 data.odes.ic = [0.02 0.0 0.0];

16 data.odes.tf = 500.0; %final time

17 data.odes.RelTol = 1*10^(-8); %IVP relative tolerance level

18 data.odes.AbsTol = 1*10^(-8); %IVP absolute tolerance level

19 data.sens.SensAbsTol = 1*10^(-8); %absolute tolerance for sensitivity variables

DATA.NAME The variable which contains the name of the problem.

DATA.ODES.RES(1–3) Here is defined the mathematical description of the system in the standard ODEs form. The notation y(number),

u(number), p(number) has to be used for the state, decision variables, and time-independent parameters,

respectively.

DATA.ODES.IC The vector of the initial state variables defined for the system.

DATA.ODES.TF The final time of the optimization, initial time is set as default at the value of 0.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 12 / 43

Page 19: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

USER INPUT: NLP DEFINITION

1 % --------------------------------------------------- %

2 % NLP definition:

3 % --------------------------------------------------- %

4 data.nlp.RHO = 5; %number of time intervals

5 data.nlp.J0 = ’y(3)’; %cost function: min-max(cost function)

6 data.nlp.u0 = [4.0]; %initial value for control values

7 data.nlp.lb = [0.0]; %lower bounds for control values

8 data.nlp.ub = [8.0]; %upper bounds for control values

9 data.nlp.solver = ’IPOPT’; %[’FMINCON’|’IPOPT’|’SRES’|’DE’|’ACOMI’|’MISQP’|’MITS’]

10 data.nlp.FreeTime = ’on’; %[’on’|’off’] set ’on’ if free time is considered

DATA.NLP.RHO The number of time intervals.

DATA.NLP.J0 The cost function is defined in the standard Mayer form. The problem is set as default to find a minimum of the

presented cost function.

DATA.NLP.U0 The initial values of the decision variables, if here is defined only one number for each control trajectory, then the

initial control trajectory is constant, otherwise is needed to define, e.g. [u01; u02; ..] whether only one initial

non-constant control trajectory is considered.

DATA.NLP.LB The vector of lower bounds of the decision variables.

DATA.NLP.UB The vector of upper bounds of the decision variables.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 13 / 43

Page 20: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

USER INPUT: EQUALITY CONSTRAINTS

1 % --------------------------------------------------- %

2 % Equality constraints (ECs):

3 % --------------------------------------------------- %

4 data.nlp.eq.status = ’on’; %[’on’|’off’] ECs

5 data.nlp.eq.NEC = 2; %number of active ECs

6 data.nlp.eq.eq(1) = {’y(1)-0.02’};

7 data.nlp.eq.eq(2) = {’y(2)-2.0’};

8 data.nlp.eq.time(1) = data.nlp.RHO;

9 data.nlp.eq.time(2) = data.nlp.RHO;

DATA.NLP.EQ.STATUS The information about the equality constrains, if those are active, set this option at the value of ’on’ otherwise ’off’.

DATA.NLP.EQ.NEC The number of active equality constraints.

DATA.NLP.EQ.EQ(1-2) The equality constraints defined by the user.

DATA.NLP.EQ.TIME(1-2) The segments after which are before defined equality constrains active.

NOTE The equality constraint of the type ’data.nl.eq.eq(1) = {’y(2)+0.1’}’ is active, the status is set at the value of ’on’ what

means that the equation

x2(tF ) = −0.1

is active in the final segment ’data.nlp.eq.time(1) = data.nlp.RHO’. This direction – timing is equal to the final time.

If we would like to set the active equality constraint on the half time of the optimization, we have to define the before

mentioned option on the value of 15 or ’data.nlp.RHO/2’.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 14 / 43

Page 21: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

USER INPUT: FINAL OPTIONS

1 % --------------------------------------------------- %

2 % Options for setting of the final output:

3 % --------------------------------------------------- %

4 data.options.intermediate = ’off’; %[’on’|’off’|’silent’] display of the intermediate results

5 data.options.trajectories = 2; %how many state trajectories will be displayed

6

7 % --------------------------------------------------- %

8 % Call of the main function (you do not change this!):

9 % --------------------------------------------------- %

10 dotcvp_main(data)

DATA.OPTIONS.INTERMEDIATE The option related to the display of the intermediate results.

DATA.OPTIONS.TRAJECTORIES How many state trajectories will be displayed in the final figure.

DOTCVP_MAIN(DATA) Here the main function of the toolbox is called together with the data input structure.

NOTE Only this file is needed for introducing a new problem into toolbox, everything else is generated

automatically. Remember that this is only a simple input file. The undefined options are taken from the

default settings [dotcvp_single_optimization_default.m], of course it is possible to change them. After

MATLAB is started, it is necessary to run the [dotcvp_install.m] file to save the paths into MATLAB

environment. Note, if you quit MATLAB environment, all paths will be deleted, so you need to run the

[dotcvp_install.m] file with the new start of MATLAB again.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 15 / 43

Page 22: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

SCREEN OUTPUT: INITIALIZATION

1 ________________________________________________________

2

3 DOTcvp: Dynamic Optimization Toolbox with CVP approach

4 for handling continuous and mixed-integer DO problems

5

6 Main author: Tomas Hirmajer, [email protected]

7 Coauthors: Eva Balsa-Canto and Julio R. Banga

8 Web pages: http://www.iim.csic.es/~dotcvp/

9 http://www.iim.csic.es/~dotcvpsb/

10 Core version: DOTcvp_R2008_E2

11 ________________________________________________________

12

13 ________________________________________________________

14

15 DOTcvp - a Module for Single Optimization

16 ________________________________________________________

17

18 Saving of the ODE ................................................. done!

19 Generation of the file: cvm_rhs.m (ODE - MATLAB) .................. done!

20 Saving of the parameters .......................................... done!

21 Generation of the file: cvm_d/bjac.m (Jacobian - MATLAB) .......... done!

22 Saving of the cost function (J0) .................................. done!

23 Generation of the file: temp_TimeDiscontinuity .................... done!

24 Generation of the gradients (J0) .................................. done!

25 Generation of the file: cvm_rhsS.m (sensitivities - MATLAB) ....... done!

26 Saving of the in/equality constraints (Ji) ........................ done!

27 Generation of the gradients (Ji) .................................. done!

28 Generation of the file: temp_cvfdx.m (main IVP file) .............. done!

29 Optimizing of the process (N=5; min(J0); IPOPT; DrugDisplacementProblemA_simple) ... in progress

30 Default settings are loading ...................................... done!

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 16 / 43

Page 23: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

SCREEN OUTPUT: RESULTS

1 ____________________________

2 Final results [single-optimization]:

3 ............. Problem name: DrugDisplacementProblemA_simple

4 ...... NLP or MINLP solver: IPOPT

5 . Number of time intervals: 5

6 ... IVP relative tolerance: 1.000000e-008

7 ... IVP absolute tolerance: 1.000000e-008

8 . Sens. absolute tolerance: 1.000000e-008

9 ............ NLP tolerance: 1.000000e-005

10 ....... Final state values: 2.000004e-002 2.000014e+000 2.212422e+002

11 ...... 1th optimal control: 7.999963e+000 7.999963e+000 7.999963e+000 8.000000e+000 5.454379e-007

12 ..... Final size of the dt: 1.000009e-001 1.000009e-001 1.000009e-001 1.886241e+002 3.231812e+001

13 ..... Final time [sum(dt)]: 2.212422e+002

14 ____________________________

15 ............ Final CPUtime: 18.89062500 seconds

16 . Cost function [min(J_0)]: 221.24223300

17

18 The detailed information is saved to the workspace structure with the name ’data’.

19

20 data =

21 name: ’DrugDisplacementProblemA_simple’

22 odes: [1x1 struct]

23 sens: [1x1 struct]

24 nlp: [1x1 struct]

25 options: [1x1 struct]

26 version: ’DOTcvp_R2008_E2’

27 compiler: ’None’

28 output: [1x1 struct]

29 p: [5.4544e-007 5]

30 gradJ0: [0 0 0 0 0 1 1 1 1 1]

31 gradJi: [2x10 double]

32 J0: 221.2422

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 17 / 43

Page 24: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Drug Displacement Problem without the path constraint

GRAPHICAL OUTPUT: OPTIMAL TRAJECTORIES

0 50 100 150 200

0.02

0.025

0.03

Time

Sta

te V

aria

ble

0 50 100 150 2000

2

4

Sta

te V

aria

ble

x1

x2

0 50 100 150 200

0

1

2

3

4

5

6

7

8

Time

Contr

ol variable

FIGURE: Optimal state trajectories (left) and the optimal control profile (right) for the drug displacement problem.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 18 / 43

Page 25: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

EXAMPLE 2: RESETTING OF CALCIUM OSCILLATOR

Example 2: Resetting of Calcium Oscillator

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 19 / 43

Page 26: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

PROBLEM DEFINITION

The model describes intracellular calcium spiking in hepatocytes induced by an extracellular increase in

adenosine triphosphate concentration. The problem is formulated as minimization of the state variables

deviations (oscillatory behaviour) from the desired values

minx(t),u(t),p

J0

∫ 22

0

4∑

j=1

wj

(

xj(t) − xsj

)2+ w5u1(t) + w6u2(t)

dt

subject to

activated G-protein → x1 = k1 + k2x1 −k3x1x2

x1 + K4

−k5x1x3

x1 + K6

active phospholipase C → x2 = (1 − u2)k7x1 −k8x2

x2 + K9

intracellular calcium → x3 =k10x2x3x4

x4 + K11

+ k12x2 + k13x1 −k16x3

x3 + K17

+x4

10− u1

k14x3

p1x3 + K15

− (1 − u1)k14x3

x3 + K15

intra-ER calcium → x4 = −k10x2x3x4

x4 + K11

+k16x3

x3 + K17

−x4

10

and the time-independent parameter: 1 ≤ p1 ≤ 1.3

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 20 / 43

Page 27: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

SIMULATION WITH NO AND FULL INHIBITION

0 2 4 6 8 10 12 14 16 18 20 220

5

10

15

20

25

30

Time

Sta

te v

aria

ble

s

x1

x2

x3

x4

0 2 4 6 8 10 12 14 16 18 20 220

2

4

6

8

10

12

14

16

18

20

Time

Sta

te v

aria

ble

s

x1

x2

x3

x4

FIGURE: Simulation of the system with no inhibition (left: u1 = 0, u2 = 0, p1 = 1) and with the constant maximum inhibition of the

PMCA (plasma membrane Ca2+) ion pump (right: u1 = 1, u2 = 0, p1 = 1.3) for the calcium oscillator problem.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 21 / 43

Page 28: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

THE SCENARIO WITH FREE TRANSITION TIMES AND ONE CONTROL VARIABLE

0 2 4 6 8 10 12 14 16 18 20 220

5

10

15

20

25

Time

Sta

te v

aria

ble

s

x1

x2

x3

x4

0 2 4 6 8 10 12 14 16 18 20 22

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time

Co

ntr

ol va

ria

ble

FIGURE: Optimal state trajectories (left) with corresponding control profile (right) for the calcium oscillator problem.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 22 / 43

Page 29: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

THE SCENARIO WITH FREE TRANSITION TIMES AND TWO CONTROL VARIABLES

0 10 200

2

4

6

8

10

12Activated G−proteins

TimeS

tate

variable

0 10 200

5

10

15

20

25

30Active Phospholipase C

Time

Sta

te v

ariable

0 10 200

1

2

3

4

5Intracellular Calcium

Time

Sta

te v

ariable

0 10 200

1

2

3

4Intra−ER Calcium

Time

Sta

te v

ariable

0 10 20

0

0.2

0.4

0.6

0.8

1

Pump Inhibitor

Time

Contr

ol variable

0 10 20

0

0.2

0.4

0.6

0.8

1

Channel Blocker

Time

Contr

ol variable

FIGURE: Optimal state and control trajectories for the calcium oscillator problem.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 23 / 43

Page 30: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Single Optimization Resetting of Calcium Oscillator

THE PROBLEM SIMULATION TO LONGER TIMES

0 10 20 30 40 50 600

5

10

15

20

25

30

Time

Sta

te v

ariable

s

x

1

x2

x3

x4

FIGURE: The problem simulation to longer times (tF = 60) without more stimuli for the calcium oscillator problem.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 24 / 43

Page 31: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Hybrid Strategy

HYBRID STRATEGY

Hybrid Strategy

WHAT IS NEEDED TO BE DONE IS JUST TO ADD OR CHANGE THE OPTION IN THE USER INPUT FILE AS FOLLOWS

data.options.action=’hybrid-strategy’

THIS PROBLEM CAN BE RUN FROM THE TOOLBOX WITH THE FOLLOWING NAME

cdop_DrugDisplacementProblemB.m < input file with all options

cdop_DrugDisplacementProblemB_simple.m < input file with minimum options, undefined

options are taken from the default file

THE FILE WITH THE DEFAULT SETTINGS FOR THE PRESENTED MODULE IS THE FOLLOWING

dotcvp_hybrid_strategy_default.m

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 25 / 43

Page 32: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Hybrid Strategy

HYBRID STRATEGY

Hybrid Strategy

WHAT IS NEEDED TO BE DONE IS JUST TO ADD OR CHANGE THE OPTION IN THE USER INPUT FILE AS FOLLOWS

data.options.action=’hybrid-strategy’

THIS PROBLEM CAN BE RUN FROM THE TOOLBOX WITH THE FOLLOWING NAME

cdop_DrugDisplacementProblemB.m < input file with all options

cdop_DrugDisplacementProblemB_simple.m < input file with minimum options, undefined

options are taken from the default file

THE FILE WITH THE DEFAULT SETTINGS FOR THE PRESENTED MODULE IS THE FOLLOWING

dotcvp_hybrid_strategy_default.m

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 25 / 43

Page 33: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Hybrid Strategy

HYBRID STRATEGY

Hybrid Strategy

WHAT IS NEEDED TO BE DONE IS JUST TO ADD OR CHANGE THE OPTION IN THE USER INPUT FILE AS FOLLOWS

data.options.action=’hybrid-strategy’

THIS PROBLEM CAN BE RUN FROM THE TOOLBOX WITH THE FOLLOWING NAME

cdop_DrugDisplacementProblemB.m < input file with all options

cdop_DrugDisplacementProblemB_simple.m < input file with minimum options, undefined

options are taken from the default file

THE FILE WITH THE DEFAULT SETTINGS FOR THE PRESENTED MODULE IS THE FOLLOWING

dotcvp_hybrid_strategy_default.m

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 25 / 43

Page 34: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Hybrid Strategy

SETTINGS FOR THE HYBRID STRATEGY

1 function [data] = dotcvp_hybrid_strategy_default(data)

2

3 switch data.option.Hybrid_method

4

5 case{’stochastic’}

6 % first step [a stochastic solver]: please fill basic settings for

7 % a stochastic solver, otherwise they will be taken from the user

8 % input file

9

10 data.option.HybridStrategy.IVPRelTol = 1e-005; % IVP relative tolerance level

11 data.option.HybridStrategy.IVPAbsTol = 1e-005; % IVP absolute tolerance level

12 data.option.HybridStrategy.NLPTol = 1e-003; % NLP tolerance level

13 data.option.HybridStrategy.NLPSolver = ’DE’; % chose a solver [’FMINCON’|’IPOPT’|’SRES’|’DE’|’ACOMI’|’MISQP’|’MITS’]

14 data.option.HybridStrategy.NLPsettings = ’None’; % insert the file name that contains settings for NLP solver, otherwise ’None’

15 data.option.HybridStrategy.MaxIter = 50; % maximum number of iterations

16 data.option.HybridStrategy.MaxCPUTime = inf; % maximum CPU time of the optimization (60*60*0.25) = 15 minutes

17 data.option.HybridStrategy.intermediate = ’off’; % [’on’|’off’|’silent’] display of the intermediate results

18

19 case{’deterministic’}

20 % second step [a deterministic solver]: all settings for a

21 % deterministic solver are taken from the user input file, but the

22 % user can introduce some new or special settings, which rewrites

23 % those from the input file. The name of the structure is the same

24 % as the name in the user input file, e.g. data.nlp.RHO, etc.

25

26 end

27

28 end

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 26 / 43

Page 35: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Drug Displacement Problem with the path constraint

EXAMPLE 3: DRUG DISPLACEMENT PROBLEM WITH THE PATH CONSTRAINT

Example 3: Drug Displacement Problem with the path constraint

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 27 / 43

Page 36: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Drug Displacement Problem with the path constraint

PROBLEM DEFINITION

The problem consists of the right rate projection of phenylbutazone infusion to minimize the time needed to reach

in a patient’s bloodstream a desired level of two drugs

minui ,ti

J0{tF}

subject to

x1 = g1(g4(0.02 − x1) + 46.4x1(u − 2x2))

x2 = g1(g3(u − 2x2)) + 46.4(0.02 − x1)

with gi , i = 1, 4 defined as follows

g2 = 1 + 0.2(x1 + x2), g3 = g22 + 232 + 46.4x2, g4 = g2

2 + 232 + 46.4x1, g1 =g2

2

g3g4 − 2152.96x1x2

where the state variables represent the concentration of warfarin and phenylbutazone drugs. The initial values

were set for the process and decisions variables at the value of x0 = [0.02; 2.00] and u0 = [4], respectively. The

boundaries of the decision variables are as follows: u ∈ [0; 8].The equality point constraints on the final amount of displacement drugs are given by

x1(tF ) = 0.02, x2(tF ) = 2.00, x1(t) ≤ 0.026

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 28 / 43

Page 37: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Drug Displacement Problem with the path constraint

USER INPUT: INEQUALITY CONSTRAINTS AND SOME FINAL O;PTIONS

1 % --------------------------------------------------- %

2 % Inequality /path/ constraints (INECs):

3 % --------------------------------------------------- %

4 data.nlp.ineq.status = ’on’; %[’on’|’off’] INECs

5 data.nlp.ineq.NEC = 1; %number of active INECs

6 data.nlp.ineq.InNUM = 0; %how many inequality constraints are ’>’ else ’<’

7 data.nlp.ineq.eq(1) = {’y(1)-0.026’};

8 data.nlp.ineq.Tol = 10^(-6); %tolerance level of violation of INECs

9 data.nlp.ineq.PenaltyFun = ’on’; %[’on’|’off’] INECs penalty function

10 data.nlp.ineq.PenaltyCoe = 10^(5); %J0=J0+data.nlp.ineq.PenaltyCoe*ViolationOfInequalityConstraint

11 /* for every inequality constraint one parameter */

12

13 % --------------------------------------------------- %

14 % Options for setting of the final output:

15 % --------------------------------------------------- %

16 data.options.trajectories = 2; %how many state trajectories will be displayed

17

18 data.options.action = ’hybrid-strategy’; %[’single-optimization’|’re-optimization’|’hybrid-strategy’|’simulation’]

DATA.NLP.INEQ.STATUS The information about the inequality constrains, if those are active, set this option at the value of ’on’ otherwise ’off’.

DATA.NLP.INEQ.NEC The number of active inequality constraints.

DATA.NLP.INEQ.INNUM In this option the user sets how many inequality constraints are ’>’ else ’<’.

DATA.NLP.INEQ.EQ(1) The inequality constraints defined by the user.

DATA.NLP.INEQ.TOL The tolerance level of violation of the inequality constraints.

DATA.OPTIONS.ACTION The hybrid strategy was chosen instead of a single optimization module.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 29 / 43

Page 38: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Hybrid Strategy Drug Displacement Problem with the path constraint

GRAPHICAL OUTPUT: OPTIMAL TRAJECTORIES

0 50 100 150 200 2500.019

0.02

0.021

0.022

0.023

0.024

0.025

0.026

0.027

Time

Sta

te V

ariable

0 50 100 150 200 2500

0.5

1

1.5

2

2.5

3

3.5

4

Sta

te V

ariable

x1

x2

0 50 100 150 200 250

0

1

2

3

4

5

6

7

8

Time

Contr

ol variable

FIGURE: Optimal state trajectories (left) and the optimal control profile (right) for the drug displacement problem with the path constraint.

Final value of the cost function is 266.0897 (tF ) and violation of the constraints is less than 10−8.

The Stochastic part is secured by DE and the deterministic part by MISQP.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 30 / 43

Page 39: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB

IMPORTING SBML MODELS

Importing SBML Models

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 31 / 43

Page 40: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB

SBML TO DOTCVPSB

SBML to DOTcvpSB

THE TRANSLATOR FROM THE SBML, TYPICALLY THE ’XML’ FILES TO THE DOTCVPSB ’.DOTCVP’ CAN BE DONE BY

TYPING THE FOLLOWING NAME

dotcvp_sbml2dotcvpsb.m

The problem can be downloaded as ’.xml’ file from the following web page:

http://www.ebi.ac.uk/biomodels/

BIOMD0000000005 Tyson1991_CellCycle_6var 1831270

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 32 / 43

Page 41: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB

SBML TO DOTCVPSB

SBML to DOTcvpSB

THE TRANSLATOR FROM THE SBML, TYPICALLY THE ’XML’ FILES TO THE DOTCVPSB ’.DOTCVP’ CAN BE DONE BY

TYPING THE FOLLOWING NAME

dotcvp_sbml2dotcvpsb.m

The problem can be downloaded as ’.xml’ file from the following web page:

http://www.ebi.ac.uk/biomodels/

BIOMD0000000005 Tyson1991_CellCycle_6var 1831270

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 32 / 43

Page 42: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB cdc2-cyclin Model

EXAMPLE 4: CDC2-CYCLIN MODEL

Example 4: cdc2-cyclin Model

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 33 / 43

Page 43: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Part 1

SBML TO DOTCVPSB: PART 1

1 ______________________________________________________________

2

3 DOTcvpSB: Dynamic Optimization Toolbox with CVP approach for

4 handling continuous and MIDO problems in Systems Biology

5

6 Main author: Tomas Hirmajer, [email protected]

7 Coauthors: Eva Balsa-Canto and Julio R. Banga

8 Web page: http://www.iim.csic.es/~dotcvpsb/

9 Core version: DOTcvp_R2008_E2

10 _______________________________________________________________

11

12 _______________________________________________________________

13

14 DOTcvpSB - a Module for Import of SBML Models (.xml)

15 Note: this module requires the installation of SBML toolbox.

16 _______________________________________________________________

17

18 Do you want to print all the import information on the screen? [y|n]: y

19

20 Name: Tyson1991_CellCycle_6var

21 ID: Tyson1991CellModel_6

22 SBML_level: 2

23 SBML_version: 1

24 Time_symbol:

25

26 --- Getting information from model functions ------------------

27 1. parameter from the model : k6 (k6_Reaction1) = 1.000000 (1.000000)

28 2. parameter from the model : k8notP (k8notP_Reaction2) = 1000000.000000 (1000000.000000)

29 3. parameter from the model : k9 (k9_Reaction3) = 1000.000000 (1000.000000)

30 4. parameter from the model : k3 (k3_Reaction4) = 200.000000 (200.000000)

31 5. parameter from the model : k5notP (k5notP_Reaction5) = 0.000000 (0.000000)

32 6. parameter from the model : k1aa (k1aa_Reaction6) = 0.015000 (0.015000)

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 34 / 43

Page 44: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Part 2

SBML TO DOTCVPSB: PART 2

1 7. parameter from the model : k2 (k2_Reaction7) = 0.000000 (0.000000)

2 8. parameter from the model : k7 (k7_Reaction8) = 0.600000 (0.600000)

3 9. parameter from the model : k4 (k4_Reaction9) = 180.000000 (180.000000)

4 10. parameter from the model : k4prime (k4prime_Reaction9) = 0.018000 (0.018000)

5

6 --- Getting information from reaction functions ---------------

7 1. parameter for reaction( 1) : k6 (k6_Reaction1) = 1.000000 (1.000000)

8 2. parameter for reaction( 2) : k8notP (k8notP_Reaction2) = 1000000.000000 (1000000.000000)

9 3. parameter for reaction( 3) : k9 (k9_Reaction3) = 1000.000000 (1000.000000)

10 4. parameter for reaction( 4) : k3 (k3_Reaction4) = 200.000000 (200.000000)

11 5. parameter for reaction( 5) : k5notP (k5notP_Reaction5) = 0.000000 (0.000000)

12 6. parameter for reaction( 6) : k1aa (k1aa_Reaction6) = 0.015000 (0.015000)

13 7. parameter for reaction( 7) : k2 (k2_Reaction7) = 0.000000 (0.000000)

14 8. parameter for reaction( 8) : k7 (k7_Reaction8) = 0.600000 (0.600000)

15 9. parameter for reaction( 9) : k4 (k4_Reaction9) = 180.000000 (180.000000)

16 10. parameter for reaction( 9) : k4prime (k4prime_Reaction9) = 0.018000 (0.018000)

17

18 --- Determine species role in reaction ------------------------

19 1. species( 1) reaction( 1) : [0]

20 2. species( 1) reaction( 2) : [0]

21 3. species( 1) reaction( 3) : [0]

22 4. species( 1) reaction( 4) : [0]

23 5. species( 1) reaction( 5) : [0]

24 6. species( 1) reaction( 6) : [0 1 0 0 1]

25 7. species( 1) reaction( 7) : [1 0 0 1 0]

26 8. species( 1) reaction( 8) : [1 0 0 1 0]

27 9. species( 1) reaction( 9) : [0]

28 10. species( 2) reaction( 1) : [1 0 0 1 0]

29 11. species( 2) reaction( 2) : [0 1 0 0 1]

30 12. species( 2) reaction( 3) : [1 0 0 1 0]

31 13. species( 2) reaction( 4) : [0]

32 ...

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 35 / 43

Page 45: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Part 3

SBML TO DOTCVPSB: PART 3

1 --- Determine stoichiometry matrix ----------------------------

2 1. species( EmptySet) : 0 0 0 0 0 -1 1 1 0

3 2. species( C2) : 1 -1 1 0 0 0 0 0 0

4 3. species( CP) : 0 1 -1 -1 0 0 0 0 0

5 4. species( M) : -1 0 0 0 -1 0 0 0 1

6 5. species( pM) : 0 0 0 1 1 0 0 0 -1

7 6. species( Y) : 0 0 0 -1 0 1 -1 0 0

8 7. species( YP) : 1 0 0 0 0 0 0 -1 0

9

10 ---- Determine initial concentration --------------------------

11 1. species( EmptySet) : 0.000000

12 2. species( C2) : 0.000000

13 3. species( CP) : 1.000000

14 4. species( M) : 0.000000

15 5. species( pM) : 0.300000

16 6. species( Y) : 0.000000

17 7. species( YP) : 0.000000

18

19 --- Get rate laws from reactions ------------------------------

20 1. species( EmptySet) : 0

21 2. species( C2) : + (k6_Reaction1*M) - (C2*k8notP_Reaction2) + (CP*k9_Reaction3)

22 3. species( CP) : + (C2*k8notP_Reaction2) - (CP*k9_Reaction3) - (CP*k3_Reaction4*Y)

23 4. species( M) : - (k6_Reaction1*M) - (k5notP_Reaction5*M) + (pM*(k4prime_Reaction9+k4_Reaction9*power(M,2)))

24 5. species( pM) : + (CP*k3_Reaction4*Y) + (k5notP_Reaction5*M) - (pM*(k4prime_Reaction9+k4_Reaction9*power(M,2)))

25 6. species( Y) : - (CP*k3_Reaction4*Y) + (k1aa_Reaction6) - (k2_Reaction7*Y)

26 7. species( YP) : + (k6_Reaction1*M) - (k7_Reaction8*YP)

27

28 --- Get rate laws from rules ----------------------------------

29 1. species( EmptySet) : 0

30 2. species( C2) : 0

31 3. species( CP) : 0

32 4. species( M) : 0

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 36 / 43

Page 46: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Part 4

SBML TO DOTCVPSB: PART 4

1 5. species( pM) : 0

2 6. species( Y) : 0

3 7. species( YP) : 0

4

5 --- Get species algebraic rules -------------------------------

6 1. species( EmptySet) : 0

7 2. species( C2) : 0

8 3. species( CP) : 0

9 4. species( M) : 0

10 5. species( pM) : 0

11 6. species( Y) : 0

12 7. species( YP) : 0

13

14 --- Get species assignment rules ------------------------------

15 1. species( EmptySet) 1.: 0

16 2. species( C2) 2.: 0

17 3. species( CP) 3.: 0

18 4. species( M) 4.: 0

19 5. species( pM) 5.: 0

20 6. species( Y) 6.: 0

21 7. species( YP) 7.: 0

22

23 The final order for replacement is: 1 7 5 3 2 6 4

24

25 --- Get information about events ------------------------------

26

27 --- Get information about rules -------------------------------

28

29 --- Get information about compartments ------------------------

30 1. comp.( cell) : NaN

31

32 Please, select an action:

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 37 / 43

Page 47: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Part 5

SBML TO DOTCVPSB: PART 5

1 [1] simulation of the model

2 [2] single-optimization of the model

3 1

4

5 Please, enter a final time (data.odes.tf) of the simulation: 100

6

7 --- Save: the original model from SBML ... OK

8 --- Save: the information about the rules ... OK

9 --- Save: the information about the species ... OK

10 --- Save: parameters ... OK

11 --- Save: compartments ... OK

12 --- Save: events if they are define ... OK

13 --- Save: rules ... OK

14 --- Save: differential equations ... OK

15 --- Save: the initial concentration ... OK

16

17 Input file was saved correctly as dotcvp_Tyson1991_CellCycle_6var.m

18 Please, check if the resulting input file is correct.

19

20 ans =

21

22 typecode: ’SBML_MODEL’

23 metaid: ’_000001’

24 notes: [1x3684 char]

25 annotation: [1x2086 char]

26 SBML_level: 2

27 SBML_version: 1

28 name: ’Tyson1991_CellCycle_6var’

29 id: ’Tyson1991CellModel_6’

30 functionDefinition: [1x0 struct]

31 unitDefinition: [1x0 struct]

32 ...

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 38 / 43

Page 48: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB SBML to DOTcvpSB: Simulation

SBML TO DOTCVPSB: SIMULATION

1 ________________________________________________________

2

3 DOTcvp: Dynamic Optimization Toolbox with CVP approach

4 for handling continuous and mixed-integer DO problems

5

6 Main author: Tomas Hirmajer, [email protected]

7 [email protected]

8 Coauthors: Eva Balsa-Canto and Julio R. Banga

9 Web pages: http://www.iim.csic.es/~dotcvp/

10 http://www.iim.csic.es/~dotcvpsb/

11 Core version: DOTcvp_R2008_E2

12 ________________________________________________________

13

14 ________________________________________________________

15

16 DOTcvp - a Module for Simulation

17 ________________________________________________________

18

19 Generation of the file: cvm_rhs.m (ODE - MATLAB) .................. done!

20 Simulation in progress, please wait ...............................

21 Deleting of the temporary files ................................... done!

22

23 The detailed information is saved to the workspace structure with the name ’data’.

Only the files, which are necessary for the simulation are generated and later deleted.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 39 / 43

Page 49: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB cdc2-cyclin Model

GRAPHICAL OUTPUT: STATE TRAJECTORIES

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

1.2

1.4Tyson1991−CellCycle−6var

Time

Sta

te v

ariable

s

x

1

x2

x3

x4

x5

x6

x7

FIGURE: The presented figure shows the dynamical behavior of the cdc2-cyclin model. The figure is generated by the simulation

module.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 40 / 43

Page 50: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

SBML to DOTcvpSB cdc2-cyclin Model

THANK YOU FOR YOUR ATTENTION

Thank you for your Attention

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 41 / 43

Page 51: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Toolbox References

TOOLBOX REFERENCES

IVP SOLVER:

SUNDIALS A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, D. E. Shumaker, and C. S. Woodward, Sundials: Suite of nonlinear and

differential/algebraic equation solvers, ACM Transactions on Mathematical Software, 31 (2005), pp. 363-396.

NLP SOLVERS:

IPOPT A. Wächter and L. T. Biegler, On the implementation of a primal-dual interior point filter line search algorithm for large-scale nonlinear

programming, Mathematical Programming, 106 (2006), pp. 25-57.

FMINCON T. Coleman, M. A. Branch, and A. Grace, Optimization toolbox for use with matlab user’s guide ver. 2, 1998.

DE R. Storn and K. Price, Differential evolution – a simple and efficient heuristic for global optimization over continuous spaces, Journal of

Global Optimization, 11 (1997), pp. 341-359.

SRES T. P. Runarsson and X. Yao, Stochastic ranking for constrained evolutionary optimization, IEEE Transactions Evolutionary Computation, 4

(2000), pp. 284-294.

MINLP SOLVERS:

MISQP O. Exler and K. Schittkowski, A trust region sqp algorithm for mixed-integer nonlinear programming, Optimization Letters, 1 (2007), pp.

269-280.

ACOMI M. Schlüter, J. A. Egea, and J. R. Banga. Extended ant colony optimization for non-convex mixed integer nonlinear programming.

Computers & Operations Research, (2008), doi:10.1016/j.cor.2008.08.015.

MITS O. Exler, L. T. Antelo, J. A. Egea, A. A. Alonso, and J. R. Banga, A tabu search-based algorithm for mixed-integer nonlinear problems and

its application to integrated process and control system design, Computers and Chemical Engineering, 32 (2008), pp. 1877-1891.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 42 / 43

Page 52: Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banganautilus.iim.csic.es/~dotcvpsb/files/research/dotcvpsb/DOTcvpSB_tutorial.pdf · Consider a dynamical system described by the vector

Problem References and Acknowledgments

PROBLEM REFERENCES AND ACKNOWLEDGMENTS

SINGLE OPTIMIZATION:

DRUG DISPLACEMENT PROBLEM E. Balsa-Canto, V. S. Vassiliadis, and J. R. Banga. Dynamic optimization of single- and multi-stage systems using a hybrid

stochastic-deterministic method . Industrial and Engineering Chemistry Research, 44(5):1514-1523, 2005

CALCIUM OSCILLATOR MODEL U. Kummer, L. F. Olsen, C. J. Dixon, A. K. Green, E. Bornberg-Bauer, and G. Baier. Switching from Simple to Complex Oscillations

in Calcium Signaling. Biophysical Journal, 79(3):1188-1195, 2000.

CALCIUM OSCILLATOR PROBLEM Lebiedz, D., Sager, S., Bock, H., and Lebiedz, P. (2005). Annihilation of limit-cycle oscillations by identification of critical perturbing

stimuli via mixed-integer optimal control . Phys. Rev. Lett., 95, 108303.

SBML TO DOTCVPSB:

CDC2-CYCLIN MODEL J. J. Tyson, Modeling the cell division cycle: cdc2 and cyclin interactions, Proc. Nati. Acad. Sci. USA, 88 (1991), pp. 7328-7332.

SBMLTOOLBOX S. M. Keating, B. J. Bornstein, A. Finney, and M. Hucka, SBMLToolbox: an SBML toolbox for MATLAB users, Bioinformatics, 22

(2006), pp. 1275-1277.

ACKNOWLEDGMENTS: The first author kindly acknowledges the support under the JAE-doc programme from the CSIC, Spain.

Tomáš Hirmajer, Eva Balsa-Canto, and Julio R. Banga () Brief Tutorial on Using DOTcvpSB April 5, 2009 43 / 43


Recommended