
%This information corresponds to the 10 node lac operon network as
%described in "Boolean Models Can Explain Bistability in the lac Operon" by
%ALAN VELIZ-CUBA and BRANDILYN STIGLER

% Alex Mueller

% M = C and ~R and ~Rm
% P = M
% B = M
% C = ~Ge
% R = ~A and ~Am
% Rm =(~A and ~Am) or R
% A = L and B
% Am = L or Lm
% L = P and Le and ~Ge
% Lm =((Lem and P) or Le) and ~Ge

% Parameters Le = 0, Ge = 0, Lem = 1

% [M,P,B,C,R,Rm,A,Am,L,Lm]

%number of nodes
n = 10;

%number of states for each variable
p = 2;


nv =  [3 1 1 0 2 3 2 2 0 1];

varF = [4 1 1 -1 7 5 3 9 -1 2
        5 -1 -1 -1 8 7 9 10 -1 -1
        6 -1 -1 -1 -1 8 -1 -1 -1 -1];
        
F = [0 0 0 1 1 1 0 0 0 0
     0 1 1 -1 0 0 0 1 -1 1
     0 -1 -1 -1 0 0 0 1 -1 -1
     0 -1 -1 -1 0 0 1 1 -1 -1
     1 -1 -1 -1 -1 1 -1 -1 -1 -1
     0 -1 -1 -1 -1 1 -1 -1 -1 -1
     0 -1 -1 -1 -1 1 -1 -1 -1 -1
     0 -1 -1 -1 -1 1 -1 -1 -1 -1];
     

%Google parameter
pp = .9;

%Parameters for genetic algorithm
v=(1);
generations = 40;
pop_size = 30;
prob = .6;
sigma = .03;
mut = .5;
eps = .00001;

% indices_list = [113,966];
indices_list = (966);


% uses estimated google
prop=geneticEstGoogle(v,indices_list, p, nv, F, varF, pp, generations,pop_size,sigma,mut,eps, 1000);
disp(prop)
steady_vector=googleRank(F,varF,nv,prop,p,pp);
steady_vector(966)
% Results on April 22, 2016
% prop
% 0.8192    1.0000    0.9780    0.6207    0.1104    0.6370    0.2266    0.8240    0.4899    0.6003
% 0.1738    0.5996    0.0301    0.9894    0.3929    1.0000    0.3339    0.0792    0.5274    0.0657
% score: 0.5740 (estim)
% score: 0.5485 (exact)
