function sol=ParseSolution2(q,model,m)
global good;
good=0;
    I=model.I;
    J=model.Usedveihcle;
    d=model.d;
    d0=model.d0;
    r=model.r;  
    global c cycle_time directindex;
    v=model.v;
    t1=model.t1;
    numetimefine=zeros(1,J(m));
    global next_helpstatue;
    global before_helpstatue;
    DelPos=find(q>I(m));
    Usedveihcle=model.Usedveihcle(m);
    From=[0 DelPos]+1;
    To=[DelPos I(m)+J(m)]-1; 
    
    L=cell(J(m),1);
    D=zeros(1,J(m));
    stationarriavaltime=zeros(1,J(m));
    UC=zeros(1,J(m));
    maxUC=zeros(1,J(m));
    %numgetoff=zeros(1,J(m));
    % arrival time
    AT=zeros(1,I(m));
    %waiting time before departure in veihcle and station
    WT=zeros (1,I(m));
    for j=1:J(m)-(next_helpstatue(m)+before_helpstatue(m))
        L{j}=q(From(j):To(j));
        UC(j)=sum(model.r(m,L{j}));
        maxUC(j)=UC(j);
      
        if ~isempty(L{j})
           D(j)=d0(m,L{j}(1));   
           for k=1:numel(L{j})
                AT(L{j}(k))=t1(m)+D(j)/v;
                if k<numel(L{j})
                    D(j)=D(j)+d(L{j}(k),L{j}(k+1),m);
                end 
           end
           D(j)=D(j)+d0(m,L{j}(end));                
        else
           Usedveihcle=Usedveihcle-1;
           good=1;
        end
        stationarriavaltime(j)=t1(m)+D(j)/v;
        %% Waiting Time of vehicles 
        if ~isempty(L{j})
           
            for k=1:numel(L{j})              
                if model.r(m,L{j}(k))== 1
                    UC(j)=UC(j)-1; % update used capacity 
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                    WT (L{j}(k))=AT(L{j}(k))-t1(m); %time window- pickdown time
                    if  WT (L{j}(k))>directindex*model.tdirect(m,L{j}(k))
                        numetimefine(j)=numetimefine(j)+1;
                    end
                else
                    WT (L{j}(k))=stationarriavaltime(j)-AT(L{j}(k)); %time window- pickup time
                    if  WT (L{j}(k))>directindex*model.tdirect(m,L{j}(k))
                        numetimefine(j)=numetimefine(j)+1;
                    end
                    UC(j)=UC(j)+1;  % update used capacity 
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                end
            end          
        end
    end
    
    %% for  j which route is between stations from before station
    for j=J(m)-(before_helpstatue(m)+next_helpstatue(m))+1:J(m)-next_helpstatue(m)
         L{j}=q(From(j):To(j));
         UC(j)=sum(model.r(m,L{j}));
         maxUC(j)=UC(j);
         %numgetoff(j)=sum(model.r(m,L{j}));%%%%%%nemitune uni ke daristagahe ghabl hast ro savar kone
       
        
        if ~isempty(L{j})
            g=model.x(m,L{j} (1))-model.x0(m-1);
            h=model.y(m,L{j} (1))-model.y0(m-1);
            D(j)=sqrt(g.^2+h.^2);
            for k=1:numel(L{j})
                AT(L{j}(k))=t1(m)+D(j)/v;
                if k<numel(L{j})
                    D(j)=D(j)+d(L{j}(k),L{j}(k+1),m);
                end 
            end            
            D(j)=D(j)+d0(m,L{j}(end));
           else
           Usedveihcle=Usedveihcle-1;
           good=1;
        end
        stationarriavaltime(j)=t1(m)+D(j)/v;
        
        if ~isempty(L{j})
            for k=1:numel(L{j})
                if model.r(m,L{j}(k))== 1
                    WT (L{j}(k))=AT(L{j}(k))-t1(m); %arrival time- departure time
                    UC (j)= UC(j)-1; % update used capacity
                    if  WT (L{j}(k))>directindex*model.tdirect(m,L{j}(k))
                        numetimefine(j)=numetimefine(j)+1;
                    end
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                else
                    WT (L{j}(k))=stationarriavaltime(j)-AT(L{j}(k)); %stationarrival time- pickup time
                    if  WT (L{j}(k))>model.tdirect(m,L{j}(k))*directindex
                        numetimefine(j)=numetimefine(j)+1;
                    end
                    UC(j)= UC(j)+1; % update used capacity   
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                end
            end            
        end
    end
   %%
   for j=J(m)-next_helpstatue(m)+1:J(m)
         L{j}=q(From(j):To(j));
         UC(j)=sum(model.r(m,L{j}));
         maxUC(j)=UC(j);
         %numgetoff(j)=sum(model.r(m,L{j}(1:end)));%%%%%%nemitune uni ke daristagahe ghavl hast ro savar kone
               
        if ~isempty(L{j})
            g=model.x(m,L{j} (1))-model.x0(m+1);
            h=model.y(m,L{j} (1))-model.y0(m+1);
            D(j)=sqrt(g.^2+h.^2);
            for k=1:numel(L{j})
                AT(L{j}(k))=t1(m+1)+D(j)/v;
                if k<numel(L{j})
                    D(j)=D(j)+d(L{j}(k),L{j}(k+1),m);
                end 
            end            
            D(j)=D(j)+d0(m,L{j}(end));
            else
           Usedveihcle=Usedveihcle-1;
           good=1;
        end
        stationarriavaltime(j)=t1(m+1)+D(j)/v;
 %%
         if ~isempty(L{j})
            for k=1:numel(L{j})
                if model.r(m,L{j}(k))== 1
                    WT (L{j}(k))=AT(L{j}(k))-t1(m+1); %time window- pickdown time
                    UC (j)= UC(j)-1; % update used capacity 
                    
                    if  WT (L{j}(k))> directindex*model.tdirect(m,L{j}(k))
                        numetimefine(j)=numetimefine(j)+1;
                    end
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                else
                    WT (L{j}(k))=stationarriavaltime(j)-AT(L{j}(k)); %arrival tme- pickup time
                    UC(j)= UC(j)+1; % update used capacity   
                    if  WT (L{j}(k))> directindex*model.tdirect(m,L{j}(k))
                        numetimefine(j)=numetimefine(j)+1;
                    end
                    if  UC(j)> maxUC(j)
                        maxUC(j)=UC(j);
                    end
                end
            end             
        end
    end
    %%
    CV=max(maxUC./c-1,0);
    MeanCV=mean(CV);
    
    sol.cycletime_constraint=sum(max((D/v)-cycle_time,0));
    sol.D=D;
    sol.stationarriavaltime=stationarriavaltime;
    sol.WT=WT;
    sol.L=L;
    sol.maxUC=maxUC;
    sol.numetimefine=numetimefine;%/I(m);
    sol.MaxD=max(D);
    sol.TotalD=sum(D);
    sol.AT=AT;
    sol.MeanCV=MeanCV;
    sol.IsFeasible=(MeanCV==0  && sum(numetimefine)==0 &&sol.cycletime_constraint==0 );%&& sol.numgetoff==0 && Meanstationarriavaltime==0
    %sol.Meanstationarriavaltime=Meanstationarriavaltime;
    sol.Usedveihcle=Usedveihcle;
    sol.TotalWT=sum(WT); % sum of waiting time
end