help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] [Fwd: How to rewrite a nonlinear expression in a linear


From: Jeffrey Kantor
Subject: Re: [Help-glpk] [Fwd: How to rewrite a nonlinear expression in a linear one]
Date: Mon, 1 Apr 2013 18:47:28 -0400

Hi Sina,

This looks like a compartmental SIR type of model with multiple contagions.  These models are inherently nonlinear because of the denominator in the term you indicated was a problem, and additional terms for infection rate, etc.  I'm afraid there's not much you can do if you're looking for a global linearization without imposing some pretty rigid controllers in place which force linearization.

You could obtain a local linearization valid in the neighborhood of a steady state.  That might be useful if you're eventually looking for optimal control policies.   You could also create a convex outer approximation for the dynamics, but I'm not sure how helpful that would be for this problem.

So if what you're looking for is a global linearization of this inherently nonlinear model, I'm afraid MathProg may not be the right tool for the job.

Jeff




On Mon, Apr 1, 2013 at 6:04 PM, Andrew Makhorin <address@hidden> wrote:
-------- Forwarded Message --------
From: Sina Burkhardt <address@hidden>
To: address@hidden
Subject: How to rewrite a nonlinear _expression_ in a linear one
Date: Mon, 1 Apr 2013 23:31:16 +0200

Hi all,



I’m currently writing my Master thesis and I hope someone can help me to
solve the following problem(s) with my model as quickly as possible.

I use glpk(gusek) and my model needs unfortunately two nonlinear
expressions.

Is there any possibility to rewrite these nonlinear expressions into
linear ones to solve it with gusek?

Or can I assign a solution value of var to an parameter or something
like that to avoid the nonlinear type?



Here’s an abstract of the model : (the “problems” are red labeled)





###Declarations####

param T, integer; #horizont of time

set D;     #  DemandPoints



/*Periodenzeitraum*/

set P, default{1..T};             # Planungshorizont T



var susceptible{j in D,t in 0..T}>=0,integer;

var N{j in D,t in 0..T}>=0,integer;                        # Population
at DemandPoint j in periode t

var I{j in D,t in 0..T}>=0;                        # Persons who are
infected at DemandPoint j in periode t

var I_nB{j in D,t in 0..T}>=0,integer #Infected without treatment at
DemandPoint j in periode t

var I_neu{j in D,t in P}>=0;                               # add.
infected persons in j in t

var lambda{j in D,t in P}>=0;                             #Infectionrate



/*Index of contagions*/

param c, >=0,<=1;



/*contactrate*/

param kappa{D};



param beta{j in D}:=kappa[j]*c;



/*Init. in  t=0*/

init_Population{j in D}: N[j,0]=init_N0[j];

init_Infiziert{j in D}: I[j,0]=init_I0[j];

init_Gesund{j in D}: susceptible[j,0]=N[j,0]-I[j,0];



population{j in D,t in P}: N[j,t]=susceptible[j,t]+I[j,t];   #with var
I{j in D,t in P}

Gesunde{j in D,t in P}: susceptible[j,t]= susceptible[j,t-1]-
I_neu[j,t];



#Calculate infectionrate

s.t. infekt_rate{j in D,t in P}: lambda[j,t]=beta[j]*
(I_nB[j,t-1] /N[j,t-1]); #Here’s the first Problem because its nonlinear
and glpk can not solve NLP.



#Calculate the new infected persons

Neuinfiziert{j in D,t in P}: I_neu[j,t]=
lambda[j,t]*susceptible[j,t-1];



# example data



data;

set D:= D1;

param T:=3;

param c:=0.2;

param kappa:= D1 10;

param init_N0:= D1            100000;

param init_I0:= D1              1000;



end;







I would be very happy about your help.

Thanks in advance.



Regards,

Sina











_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]