classdef model < handle
    properties
        vector
        Slist
        Ilist
        Rlist
        Wlist
    end
    
    methods
        function obj=model(S, I, R, Waiting, N)
            if nargin > 4
                repeat = N;
            else
                repeat = 100;
            end
                
            obj.vector(1) = S;
            obj.vector(2) = I;
            obj.vector(3) = R;
            for i = 1:Waiting
                obj.vector(3+i) = 0;
            end
            obj.Slist = zeros(1, repeat);
            obj.Ilist = zeros(1, repeat);
            obj.Rlist = zeros(1, repeat);
            obj.Wlist = zeros(1, repeat);
        end
        
        function step(obj, i, coeffs, VaccinationVec)
            obj.Slist(i) = obj.vector(1);
            obj.Ilist(i) = obj.vector(2);
            obj.Rlist(i) = obj.vector(3);
            obj.Wlist(i) = sum(obj.vector(4:length(obj.vector)));
            obj.vector = step(obj.vector, coeffs, VaccinationVec(i));
        end
    end
end
    