Package org.woped.quantana.resourcealloc

Examples of org.woped.quantana.resourcealloc.Resource


    }
  }

  public void generateReportResourceStats(SimRunStats rs) {
    for (ResourceStats rr : rs.getResStats().values()){
      Resource r = resAlloc.getResources().get(rr.getName());
      if (repStats.getResStats().containsKey(r)){
        ResourceStats rrs = repStats.getResStats().get(r);
        rrs.incIdleTime(rr.getIdleTime());
        rrs.incUtilizationRatio(rr.getUtilizationRatio());
      } else {
View Full Code Here


      s.incCalls();
      SimBirthEvent be = new SimBirthEvent(sim, time);
      sim.addEvent(be);
      s.setTmpNumCaseParallel(s.getNumCaseInParallel());
      if (s.hasFreeCapacity()){
        Resource r = s.getResource();
        sim.bindRes(r);
        SimActivity act = new SimActivity(c, s, r);
        SimStartEvent st = new SimStartEvent(sim, time, act);
        sim.addEvent(st);       
        s.incZeroDelays();       
View Full Code Here

      }
    }
   
    for (int i = 0; i < resObjNum; i++) {
      String name = (String) rtm.getValueAt(i, 0);
      Resource r = res.get(name);
      ResourceStats rst = rs.getResStats().get(r);
     
      String util = String.format("%,.2f", rst.getUtilizationRatio()*100);
      rtm.setValueAt(util, i, 1);
    }
View Full Code Here

      } else return (tmpNumCaseParallel == 0);   
    } else return (tmpNumCaseParallel== 0);
  }
 
  public Resource getResource(){   
    Resource r = sim.getResUtil().chooseResourceFromFreeResources(group, role);
    if (r != null){     
      sim.getResUtil().reserveResource(r);
    }   
    return r;
  }
View Full Code Here

  }
 
  public void handleQueue(double time){
    tmpNumCaseParallel = numCaseParallel;     
    while (hasFreeCapacity() && !queue.isEmpty()){
      Resource r = getResource();
      SimCase c = getCaseFromQueue();
      updateQueue(time,-1);   
      SimActivity act = new SimActivity(c, this, r);
      SimStartEvent st = new SimStartEvent(sim, time, act);
      sim.addEvent(st);       
View Full Code Here

      waitingList.remove(copy.getOriginal().getid());   
      copy.getOriginal().setcurrArrivalTime(time);
      setTmpNumCaseParallel(this.getNumCaseInParallel());
      copy.getOriginal().setjoinFinished(true);     
      if (hasFreeCapacity()){
        Resource r = getResource();
        sim.bindRes(r);
        SimActivity act = new SimActivity(copy.getOriginal(), this, r);
        SimStartEvent sta = new SimStartEvent(sim, time, act);
        sim.addEvent(sta);
        incZeroDelays();
View Full Code Here

TOP

Related Classes of org.woped.quantana.resourcealloc.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.