Lotka Volterra fishing problem (Muscod)

From mintOC
Revision as of 09:18, 28 January 2016 by SebastianSager (talk | contribs) (Moved C to Muscod)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The differential equations for the Lotka Volterra fishing problem in Muscod code read as follows

/* steady state with u == 0 */
double ref0 = 1, ref1 = 1;

/* Biomass of prey */
rhs[0] =   xd[0] - xd[0]*xd[1] - p[0]*u[0]*xd[0];
/* Biomass of predator */
rhs[1] = - xd[1] + xd[0]*xd[1] - p[1]*u[0]*xd[1];
/* Deviation from reference trajectory */
rhs[2] = (xd[0]-ref0)*(xd[0]-ref0) + (xd[1]-ref1)*(xd[1]-ref1);