Package net.amin.mobateg.helper.ampl

Examples of net.amin.mobateg.helper.ampl.Witness


            result = oTestGoal.
                checkSatisfactionOfTestGoalWithAbstractPath(currentPath);
            if(result){
              //save path and generated witness
              oTestGoal.setSatisfied(true);
                Witness generatedWitness = generateWitness(currentPath);
                IFile amplDataFile = project.getFile("PluginOutput"+ this.numberOfGeneratedTestData++ +".dat");
                removePreviousFilesIfExist(amplDataFile);
              // Output ampl data into the File
              try {
                amplDataFile.create(new ByteArrayInputStream(currentAMPLData.getBytes()),
View Full Code Here


   
    return result;
  }

  private Witness generateWitness(LinkedList<Pair<TCGTransition, TCGNode>> currentPath) {
    Witness result = new Witness();   
    result.setAssociatedPath(currentPath);
    for (TCGVariable basicVar : allModelVariables) {
      if (basicVar.isIsParameter()) {
        EList<Double> par = new BasicEList<Double>();
        try {
          par.add(ampl.getParameter(basicVar.getName()));
        } catch (IOException e) {
          e.printStackTrace();
        }
        result.put(basicVar, par);
      }
      else {
        try {
          result.put(basicVar, ampl.getVariable(basicVar.getName()));
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }
View Full Code Here

TOP

Related Classes of net.amin.mobateg.helper.ampl.Witness

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.