function model=CreateRandomModel(I,J,S,TimeWindow,V)
    %arzeshe waiting time daretebate hazine
    
    TWStart=0; 
    %TWEnd=1/3;%hour
    trainspeed=60000;
    t1=zeros (1:S);
    t2=zeros (1:S);
    tdirect=zeros(S,max(I));
    for s=1:S
        r(s,1:I(s))=randi([0 1],1,I(s));
        %% setting time for demands or in otherwords pickups  
        t1(s)=TWStart+(s-1)/12;
        %t2(s)=TWEnd+ (s-1)/12;
    end
    numeveihcle=J;
    Usedveihcle=J;
    
    
    % speed of vehicles
    v=V;
    xmin=0;
    xmax=2000*S; 
    ymin=0;
    ymax=2000;  
    %% setting time for demands or in otherwords pickups

    x=zeros(S,max(I));
    y=zeros(S,max(I));
    xmins =zeros(1,S);
    xmaxs =zeros(1,S);
    ymins =zeros(1,S);
    ymaxs =zeros(1,S);
    %stations location
    for s=1 :S
       xmins(s)=xmin+(s-1)*(xmax-xmin)/S; 
       ymins(s)=ymin; 
       xmaxs(s)=xmin+(s)*(xmax-xmin)/S; 
       ymaxs(s)=ymax; 
    end
    for s=1 : S
        x(s,1:max(I))=randi([xmins(s) xmaxs(s)],1,max(I));
        y(s,1:max(I))=randi([ymins(s) ymaxs(s)],1,max(I));
    end
  %% Setting depo or station location 
    x0=zeros (1,S);
    y0=zeros (1,S);
    for s=1:S
    x0(s)= (xmins(s) +xmaxs(s))/2;
    y0(s)= (ymins(s) +ymaxs(s))/2;
    end

    %%
    d=zeros(max(I),max(I),S);
    d0=zeros(S,max(I));
    for s=1:S
    for i=1:I(s)
        for i2=i+1:I(s)
            d(i,i2,s)=sqrt((x(s,i)-x(s,i2))^2+(y(s,i)-y(s,i2))^2);
            d(i2,i,s)=d(i,i2,s);
        end
        
        d0(s,i)=sqrt((x(s,i)-x0(s))^2+(y(s,i)-y0(s))^2);
        tdirect(s,i)=d0(s,i)/v;
    end
    
    end
    
    model.tdirect=tdirect;
    model.I=I;
    model.r=r;
    model.xmin=xmin;
    model.xmax=xmax;
    model.ymin=ymin;
    model.ymax=ymax;
    model.xmins=xmins;
    model.xmaxs=xmaxs;
    model.ymins=ymins;
    model.ymaxs=ymaxs;
    model.x=x;
    model.y=y;
    model.x0=x0;
    model.y0=y0;
    model.d=d;
    model.d0=d0;
    model.v=v;
    model.t1=t1;
    %model.t2=t2;
    %model.TWEnd=TWEnd;
    model.TWStart=TWStart;
    model.Usedveihcle=Usedveihcle;
    model.S=S;
    model.numeveihcle=numeveihcle;
    model.TimeWindow=TimeWindow;

end