Examples of Deduction


Examples of com.structis.fichesst.server.bean.domain.Deduction

        }

        List<Deduction> deductionList = persistence.getDeductions();
        if (deductionList != null) {
          for (Iterator<Deduction> iterator = deductionList.iterator(); iterator.hasNext();) {
            Deduction deduction = iterator.next();
            deduction.setFicheSt(null);
            iterator.remove();
          }
        }

        List<Progress> progressList = persistence.getProgresses();
View Full Code Here

Examples of com.structis.fichesst.server.bean.domain.Deduction

   * @param listDeduction
   * @return
   */
  private String [] createDeductionGrid(FicheSt ficheSt){
    List<Deduction> listDeduction = ficheSt.getDeductions();
    Deduction deduction = null;
    String srcDeduction = "";
    String srcSumDeduction = "";
    double canto = 0.0;
    double badge = 0.0;
    double grue = 0.0;
    double lift = 0.0;
    double benne = 0.0;
    double nettoyage = 0.0;
    double autres = 0.0; // khong co nhan
    double prorata = 0.0;
    double refacturations = 0.0;//khong co nhan
   
    for (int j = 0; j < listDeduction.size(); j++) {         
      deduction = listDeduction.get(j);
      /*srcDeduction += deduction.getDate() + Constants.SEPRATE + deduction.getCanto() + Constants.SEPRATE +
      deduction.getBadge() + Constants.SEPRATE + deduction.getGrue() + Constants.SEPRATE +
      deduction.getLift() + Constants.SEPRATE + deduction.getBenne() + Constants.SEPRATE + deduction.getNettoyage() + Constants.SEPRATE +
      deduction.getAutres() + Constants.SEPRATE + deduction.getProrata() + Constants.SEPRATE + deduction.getRefacturations() + Constants.SEPRATE;*/
      srcDeduction += append(deduction.getDate(),deduction.getCanto(),deduction.getBadge(),deduction.getGrue(),deduction.getLift(),
          deduction.getBenne(),deduction.getNettoyage(),deduction.getAutres(),deduction.getProrata(),deduction.getRefacturations());
     
      canto += deduction.getCanto();
      badge += deduction.getBadge();
      grue += deduction.getGrue();
      lift += deduction.getLift();
      benne += deduction.getBenne();
      nettoyage += deduction.getNettoyage();
      autres += deduction.getAutres();
      prorata += deduction.getProrata();
      refacturations += deduction.getRefacturations();
    }
    canto = canto * ficheSt.getPrestaCanto();
    badge = badge * ficheSt.getPrestaBadge();
    grue = grue * ficheSt.getPrestaGrue();
    lift = lift * ficheSt.getPrestaLift();
 
View Full Code Here

Examples of solver.explanations.Deduction

        if (dec != RootDecision.ROOT) {
            if (!dec.hasNext()) {
                throw new UnsupportedOperationException("DynamicBacktracking.updatVRExplain should get to a POSITIVE decision");
            }
            cobdec.setDecisionToRefute(dec);
            Deduction left = dec.getPositiveDeduction();
            expl.remove(left);
            assert left.getmType() == Deduction.Type.DecLeft;
            BranchingDecision va = (BranchingDecision) left;
            mExplanationEngine.removeLeftDecisionFrom(va.getDecision(), va.getVar());

            Deduction right = dec.getNegativeDeduction();
            mExplanationEngine.store(right, mExplanationEngine.flatten(expl));

            mSolver.getSearchLoop().setLastDecision(cobdec);
        }
        if (Configuration.PRINT_EXPLANATION && LOGGER.isInfoEnabled()) {
View Full Code Here

Examples of solver.explanations.Deduction

            nworld--;
        }
        if (dec != RootDecision.ROOT) {
            if (!dec.hasNext())
                throw new UnsupportedOperationException("RecorderExplanationEngine.updateVRExplain should get to a POSITIVE decision:" + dec);
            Deduction left = dec.getPositiveDeduction();
            expl.remove(left);
            assert left.getmType() == Deduction.Type.DecLeft;
            BranchingDecision va = (BranchingDecision) left;
            mExplanationEngine.removeLeftDecisionFrom(va.getDecision(), va.getVar());

            Deduction right = dec.getNegativeDeduction();
            mExplanationEngine.store(right, mExplanationEngine.flatten(expl));
        }
        if (Configuration.PRINT_EXPLANATION && LOGGER.isInfoEnabled()) {
            LOGGER.info("::EXPL:: BACKTRACK on " + dec /*+ " (up to " + nworld + " level(s))"*/);
        }
View Full Code Here

Examples of solver.explanations.Deduction

     */
    int compute(Explanation explanation, int currentWorldIndex) {
        int dworld = 0;
        if (explanation.nbDeductions() > 0) {
            for (int d = 0; d < explanation.nbDeductions(); d++) {
                Deduction dec = explanation.getDeduction(d);
                if (dec.getmType() == Deduction.Type.DecLeft) {
                    int world = ((BranchingDecision) dec).getDecision().getWorldIndex() + 1;
                    if (world > dworld) {
                        dworld = world;
                    }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.