Examples of Model


Examples of aima.core.logic.propositional.algorithms.Model

    dpll = new DPLL();
  }

  @Test
  public void testDPLLReturnsTrueWhenAllClausesTrueInModel() {
    Model model = new Model();
    model = model.extend(new Symbol("A"), true).extend(new Symbol("B"),
        true);
    Sentence sentence = (Sentence) parser.parse("((A AND B) AND (A OR B))");
    boolean satisfiable = dpll.dpllSatisfiable(sentence, model);
    Assert.assertEquals(true, satisfiable);
  }
View Full Code Here

Examples of am.ik.tools.pom_cleaner.jaxb.Model

        }
        JAXBContext context = JAXBContext
                .newInstance("am.ik.tools.pom_cleaner.jaxb");
        File pom = new File(args[0]);
        JAXBElement<Model> elm = createJaxbElement(context, pom);
        Model model = elm.getValue();

        Map<String, String> properties = new HashMap<String, String>();

        try {
            replaceVersion(model.getDependencies().getDependency(), properties);
            sortVersionable(model.getDependencies().getDependency());
        } catch (NullPointerException e) {
        }

        try {
            replaceVersion(model.getDependencyManagement().getDependencies()
                    .getDependency(), properties);
            sortVersionable(model.getDependencyManagement().getDependencies()
                    .getDependency());
        } catch (NullPointerException e) {
        }
        try {
            replaceVersion(model.getBuild().getPlugins().getPlugin(),
                    properties);
            sortVersionable(model.getBuild().getPlugins().getPlugin());
        } catch (NullPointerException e) {
        }
        try {
            replaceVersion(model.getBuild().getPluginManagement().getPlugins()
                    .getPlugin(), properties);
            sortVersionable(model.getBuild().getPluginManagement().getPlugins()
                    .getPlugin());
        } catch (NullPointerException e) {
        }
        try {
            replaceVersion(model.getBuild().getExtensions().getExtension(),
                    properties);
            sortVersionable(model.getBuild().getExtensions().getExtension());
        } catch (NullPointerException e) {
        }
        try {
            replaceVersion(model.getReporting().getPlugins().getPlugin(),
                    properties);
            sortVersionable(model.getReporting().getPlugins().getPlugin());
        } catch (NullPointerException e) {
        }

        Properties p = model.getProperties();
        if (p == null) {
            p = new Properties();
            model.setProperties(p);
        }
        addProperties(p, properties);
        Collections.sort(p.getAny(), new Comparator<Element>() {
            @Override
            public int compare(Element o1, Element o2) {
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.Model

  }

  @Override
  public void completeResourceValueProperty_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    if( ! model.eResource().getContents().isEmpty() ) {
      Model m = (Model) model.eResource().getContents().get(0);
      if( m.getComponentDef() != null ) {
        if( m.getComponentDef().getPreviewResourceBundle() != null ) {
          File f = RelativeFileLocator.locateFile(model.eResource().getURI(),  m.getComponentDef().getPreviewResourceBundle());
          Properties p = null;
          if (f != null) {
            FileInputStream fi = null;
            try {
              fi = new FileInputStream(f);
View Full Code Here

Examples of bpntojava.model.Model

    /**
     * Daten aus BPN laden bzw aus einer Datei.
     */
    public void getBPNData() {
        bpn = new BPN();
        model = new Model(bpn, this);
        if (bpn.getAppUsable()) {
            model.go();
            bpn.closeApp();
            view.fillDates();
            view.setGetTableButtonUsable(true);
View Full Code Here

Examples of ch.interlis.ili2c.metamodel.Model

        Iterator modeli = td.iterator();
        while (modeli.hasNext()) {
            Object mObj = modeli.next();

            if (mObj instanceof Model) {
                Model model = (Model) mObj;
                if (model instanceof TypeModel) {
                    continue;
                }
                if (model instanceof PredefinedModel) {
                    continue;
                }
                Iterator topici = model.iterator();
                while (topici.hasNext()) {
                    Object tObj = topici.next();

                    if (tObj instanceof Topic) {
                        Topic topic = (Topic) tObj;
View Full Code Here

Examples of ch.ralscha.extdirectspring.generator.Model

  public String getModel() {
    return model;
  }

  protected static String getModelName(Class<?> model) {
    Model modelAnnotation = model.getAnnotation(Model.class);

    if (modelAnnotation != null && StringUtils.hasText(modelAnnotation.value())) {
      return modelAnnotation.value();
    }
    return model.getName();
  }
View Full Code Here

Examples of ch.rasc.extclassgenerator.Model

  public void setInstanceName(String instanceName) {
    this.instanceName = instanceName;
  }

  protected static String getModelName(Class<?> model) {
    Model modelAnnotation = model.getAnnotation(Model.class);

    if (modelAnnotation != null
        && StringUtils.hasText(modelAnnotation.value())) {
      return modelAnnotation.value();
    }
    return model.getName();
  }
View Full Code Here

Examples of choco.kernel.model.Model

  public static void main(String[] args) {

    // constant of the model
   
    // our model
    Model m = new CPModel();
   
    // variables creee pour le test
    // creation de l'UV
    UV RechercheOperationnelle = new UV("Recherche Operetionnelle", 0, 14);
    // ------------------------------------------------------------------
    // construction des modules
    int nbModules = 2;
    Module complexite = new Module("Complexite");
    Module graphes = new Module("Graphes");
    // --------------------------------------- on a 2 module differents
    // construction des creneaux libres
    IntegerVariable cls1 = new IntegerVariable("debut 1", 0, 0);
    IntegerVariable clf1 = new IntegerVariable("fin 1", 3, 3);
    IntegerVariable cld1 = new IntegerVariable("duree 1", 3, 3);
    PlageCreneaux cl1 = new PlageCreneaux("premiere plage libre", cls1, clf1, cld1);
    //
    IntegerVariable cls2 = new IntegerVariable("debut 2", 4, 4);
    IntegerVariable clf2 = new IntegerVariable("fin 2", 6, 6);
    IntegerVariable cld2 = new IntegerVariable("duree 2", 2, 2);
    PlageCreneaux cl2 = new PlageCreneaux("deuxieme plage libre", cls2, clf2, cld2);
    //
    IntegerVariable cls3 = new IntegerVariable("debut 3", 7, 7);
    IntegerVariable clf3 = new IntegerVariable("fin 3", 10, 10);
    IntegerVariable cld3 = new IntegerVariable("duree 3", 3, 3);
    PlageCreneaux cl3 = new PlageCreneaux("troisieme plage libre", cls3, clf3, cld3);
    PlageCreneaux[] creneauxLibres = {cl1, cl2, cl3};
    // --------------------------------------  on a cree 12 creneaux en tout
    // construction des types d'enseigenement pour chaque module
    Prof profCMComplexite = new Prof("Chams");
    int nbCreneauxCMCOmplexite = 3;
    TypeEnseignement CMComplexite = new TypeEnseignement("CM Complexite", Type.CM, 1, 2, profCMComplexite);
    //
    Prof profCMGraphes = new Prof("Gueret Jussien");
    int nbCreneauxCMGraphes = 4;
    TypeEnseignement CMGraphes = new TypeEnseignement("CM graphes", Type.CM, 1, 2, profCMGraphes);
    //
    Prof profTDGrpahes = new Prof("Gueret Jussien");
    Prof profTDGraphes2 = new Prof("Prof 2");
    int nbCreneauxTDGraphes = 5;
    TypeEnseignement TDGraphes = new TypeEnseignement("TD graphes", Type.TD, 2, 2, profTDGrpahes);
    TDGraphes.addProf(profTDGraphes2);
    // -------------------------------------------------------
    // creation des creneaux a placer
   
   
    // constraints
    // repartition sur les plages horaires
    // les creneaux a placer ne doivent pas l'etre en meme temps
    Constraint c1 = Choco.disjunctive(creneauxAPlacer)
    m.addConstraint(c1);
   
    // precedences
    Constraint[] c2 = new Constraint[preced.length];
    for(int i = 0; i < c2.length; i++) {
      c2[i] = Choco.startsAfterBegin(preced[i].getCours2(), preced[i].getCours2(), preced[i].getDureeMinEntre());
    }
    m.addConstraint(c2);
   
    // indisponibilite des encadrants
    // TODO
   
    // blocs minimaux et maximaux pour les types de cours
View Full Code Here

Examples of com.adaptrex.core.ext.data.Model

    /*
     * Create the model
     */
    AdaptrexSession session = new AdaptrexSession(persistence);
    Model model = new Model(session, config);

    /*
     * Set the model name
     */
    String modelName = namespace + ".model."
        + (name != null ? name : className);
    config.setModelName(name);

    if (include != null) {
      config.include(include);
    }
    if (exclude != null) {
      config.exclude(exclude);
    }

    /*
     * Add associations
     */
    if (associations != null) {
      config.associations(associations);
    }

    /*
     * The proxy needs additinoal information from the model. We shouldn't
     * create the proxy until the store has been fully configured
     */
    if (rest != null) {
      String restPath = getRequest().getContextPath()
          + "/rest/"
          + (rest.equals("true") ? clazz.getSimpleName()
              .toLowerCase() : rest);
      config.setProxy(new RestProxy(restPath, config));
    }

    /*
     * TODO: Make sure we're outputting our model definition in the same way
     * as in the store
     */
    ModelDefinition modelDef = model.getModelDefinition();
    String output = "Ext.define(\"" + modelName + "\","
        + StringUtilities.json(modelDef) + ");\n";

    for (Association assoc : getAllAssociations(modelDef)) {
      ModelDefinition associatedModel = assoc
View Full Code Here

Examples of com.asakusafw.compiler.trace.testing.dmdl.model.Model

    private void verify(TestOutput<Model> out) throws IOException {
        verify(out, "Hello, world!");
    }

    private void prepare(TestInput<Model> in, String value) throws IOException {
        Model model = new Model();
        model.setValueAsString(value);
        in.add(model);
    }
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.