Examples of variable()


Examples of kodkod.ast.Decl.variable()

      final List<Formula> domConstraints = new LinkedList<Formula>();
     
      for(Decl decl : decls) { 
        final Decl skolemDecl = visit(decl);
       
        final Relation skolem = Relation.nary("$"+ skolemDecl.variable().name(), nonSkolems.size() + skolemDecl.variable().arity());
        reporter.skolemizing(decl, skolem, nonSkolemsView);
       
        final Expression skolemExpr = skolemExpr(skolemDecl, skolem);
       
        final Multiplicity mult = decl.multiplicity();
View Full Code Here

Examples of kodkod.ast.Decl.variable()

      final List<Formula> domConstraints = new LinkedList<Formula>();
     
      for(Decl decl : decls) { 
        final Decl skolemDecl = visit(decl);
       
        final Relation skolem = Relation.nary("$"+ skolemDecl.variable().name(), nonSkolems.size() + skolemDecl.variable().arity());
        reporter.skolemizing(decl, skolem, nonSkolemsView);
       
        final Expression skolemExpr = skolemExpr(skolemDecl, skolem);
       
        final Multiplicity mult = decl.multiplicity();
View Full Code Here

Examples of kodkod.ast.Decl.variable()

    final Decl decl = decls.get(currentDecl);
    final BooleanMatrix declTransl = visit(decl);
    final int position = (int)StrictMath.pow(interpreter.universe().size(), decls.size()-currentDecl-1);
    final BooleanMatrix groundValue = factory.matrix(declTransl.dimensions());
    env = env.extend(decl.variable(), groundValue);
    for(IndexedEntry<BooleanValue> entry : declTransl) {
      groundValue.set(entry.index(), BooleanConstant.TRUE);
      comprehension(decls, formula, currentDecl+1, factory.and(entry.value(), declConstraints),
          partialIndex + entry.index()*position, matrix);
      groundValue.set(entry.index(), BooleanConstant.FALSE)
View Full Code Here

Examples of kodkod.ast.Decl.variable()

    }

    final Decl decl = decls.get(currentDecl);
    final BooleanMatrix declTransl = visit(decl);
    final BooleanMatrix groundValue = factory.matrix(declTransl.dimensions());
    env = env.extend(decl.variable(), groundValue);
    for(IndexedEntry<BooleanValue> entry : declTransl) {
      groundValue.set(entry.index(), BooleanConstant.TRUE);
      all(decls, formula, currentDecl+1, factory.or(factory.not(entry.value()), declConstraints), acc);
      groundValue.set(entry.index(), BooleanConstant.FALSE)
    }
View Full Code Here

Examples of kodkod.ast.Decl.variable()

    }

    final Decl decl = decls.get(currentDecl);
    final BooleanMatrix declTransl = visit(decl);
    final BooleanMatrix groundValue = factory.matrix(declTransl.dimensions());
    env = env.extend(decl.variable(), groundValue);
    for(IndexedEntry<BooleanValue> entry : declTransl) {
      groundValue.set(entry.index(), BooleanConstant.TRUE);
      some(decls, formula, currentDecl+1, factory.and(entry.value(), declConstraints), acc);
      groundValue.set(entry.index(), BooleanConstant.FALSE)
    }
View Full Code Here

Examples of kodkod.ast.Decl.variable()

    }

    final Decl decl = decls.get(currentDecl);
    final BooleanMatrix declTransl = visit(decl);
    final BooleanMatrix groundValue = factory.matrix(declTransl.dimensions());
    env = env.extend(decl.variable(), groundValue);
    for(IndexedEntry<BooleanValue> entry : declTransl) {
      groundValue.set(entry.index(), BooleanConstant.TRUE);
      sum(decls, expr, currentDecl+1, factory.and(entry.value(), declConstraints), values);
      groundValue.set(entry.index(), BooleanConstant.FALSE)
    }
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Value.variable()

        Value bestVal = (Value)ToolBox.random(best);
       
        if (sLog.isDebugEnabled()) {
            Set conflicts = model.conflictValues(bestVal);
            double wconf = (iStat==null?0.0:iStat.countRemovals(solution.getIteration(), conflicts, bestVal));
            sLog.debug("  [tabu] "+bestVal+" ("+(bestVal.variable().getAssignment()==null?"":"was="+bestVal.variable().getAssignment()+", ")+"val="+bestEval+(conflicts.isEmpty()?"":", conf="+(wconf+conflicts.size())+"/"+conflicts)+")");
        }
       
        if (iTabu!=null)
            iTabu.add(tabuElement(bestVal));
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Value.variable()

        Value bestVal = (Value)ToolBox.random(best);
       
        if (sLog.isDebugEnabled()) {
            Set conflicts = model.conflictValues(bestVal);
            double wconf = (iStat==null?0.0:iStat.countRemovals(solution.getIteration(), conflicts, bestVal));
            sLog.debug("  [tabu] "+bestVal+" ("+(bestVal.variable().getAssignment()==null?"":"was="+bestVal.variable().getAssignment()+", ")+"val="+bestEval+(conflicts.isEmpty()?"":", conf="+(wconf+conflicts.size())+"/"+conflicts)+")");
        }
       
        if (iTabu!=null)
            iTabu.add(tabuElement(bestVal));
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Value.variable()

        }
       
        if (iTabu!=null)
            iTabu.add(tabuElement(bestVal));

        return new SimpleNeighbour(bestVal.variable(),bestVal);       
    }
   
    /**
     * Value selection
     */
 
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Value.variable()

        Value bestVal = (Value)ToolBox.random(best);
       
        if (sLog.isDebugEnabled()) {
            Set conflicts = model.conflictValues(bestVal);
            double wconf = (iStat==null?0.0:iStat.countRemovals(solution.getIteration(), conflicts, bestVal));
            sLog.debug("  [tabu] "+bestVal+" ("+(bestVal.variable().getAssignment()==null?"":"was="+bestVal.variable().getAssignment()+", ")+"val="+bestEval+(conflicts.isEmpty()?"":", conf="+(wconf+conflicts.size())+"/"+conflicts)+")");
        }
       
        if (iTabu!=null) iTabu.add(tabuElement(bestVal));
       
        return bestVal;
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.