Package com.exigen.ie.constrainer

Examples of com.exigen.ie.constrainer.IntExp


    super(vars[0].getProblem(),name);
    Problem problem = (Problem) vars[0].getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray cVars = problem.getExpArray(vars);
    try {
      IntExp cVar = (IntExp) cardVar.getImpl();
      IntExp cardinality = constrainer.cardinality(cVars,cVar);
      problem.defineConstraintImpl(this, cardinality, oper, var);
    } catch (Exception f) {
      throw new RuntimeException(
          "Failure to create constraint "+name);
    }
View Full Code Here


    super(vars[0].getProblem(),name);
    Problem problem = (Problem) vars[0].getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray cVars = problem.getExpArray(vars);
    try {
      IntExp cardinality = constrainer.cardinality(cVars,cardValue);
      problem.defineConstraintImpl(this, cardinality, oper, value);
    } catch (Exception f) {
      throw new RuntimeException(
          "Failure to create constraint "+name);
    }
View Full Code Here

    super(vars[0].getProblem(),name);
    Problem problem = (Problem) vars[0].getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray cVars = problem.getExpArray(vars);
    try {
      IntExp cVar = (IntExp) cardVar.getImpl();
      IntExp cardinality = constrainer.cardinality(cVars,cVar);
      problem.defineConstraintImpl(this, cardinality, oper, value);
    } catch (Exception f) {
      throw new RuntimeException(
          "Failure to create constraint "+name);
    }
View Full Code Here

    IntArray intValues = new IntArray(constrainer, array.length);
    for (int i = 0; i < array.length; i++) {
      intValues.set(array[i], i);
    }
    try {
      IntExp element = intValues.elementAt((IntExp) indexVar.getImpl());
      problem.defineConstraintImpl(this, element, oper, value);
    }
    catch (Exception f) {
      throw new RuntimeException("Failure to create constraint "+name);
    }
View Full Code Here

    IntArray intValues = new IntArray(constrainer, array.length);
    for (int i = 0; i < array.length; i++) {
      intValues.set(array[i], i);
    }
    try {
      IntExp element = intValues.elementAt((IntExp) indexVar.getImpl());
      problem.defineConstraintImpl(this, element, oper, var);
    }
    catch (Exception f) {
      throw new RuntimeException("Failure to create constraint "+name);
    }
View Full Code Here

    super(indexVar.getProblem(),name);
    Problem problem = (Problem) indexVar.getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray intvars = new IntExpArray(constrainer, vars.length);
    for (int i = 0; i < vars.length; i++) {
      IntExp exp = (IntExp)vars[i].getImpl();
      intvars.set(exp, i);
    }
    try {
      IntExp element = intvars.elementAt((IntExp) indexVar.getImpl());
      problem.defineConstraintImpl(this, element, oper, value);
    }
    catch (Exception f) {
      throw new RuntimeException("Failure to create constraint "+name);
    }
View Full Code Here

    super(indexVar.getProblem(),name);
    Problem problem = (Problem) indexVar.getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray intvars = new IntExpArray(constrainer, vars.length);
    for (int i = 0; i < vars.length; i++) {
      IntExp exp = (IntExp)vars[i].getImpl();
      intvars.set(exp, i);
    }
    try {
      IntExp element = intvars.elementAt((IntExp) indexVar.getImpl());
      problem.defineConstraintImpl(this, element, oper, var);
    }
    catch (Exception f) {
      throw new RuntimeException("Failure to create constraint "+name);
    }
View Full Code Here

  static final String name = "Linear";


  public Linear(Var var1, String oper, Var var2) {
    super(var1.getProblem(), name);
    IntExp cVar1 = (IntExp) var1.getImpl();
    Problem problem = (Problem) var1.getProblem();
    problem.defineConstraintImpl(this, cVar1, oper, var2);
  }
View Full Code Here

    problem.defineConstraintImpl(this, cVar1, oper, var2);
  }
 
  public Linear(Var var, String oper, int value) {
    super(var.getProblem(), name);
    IntExp cVar = (IntExp) var.getImpl();
    Problem problem = (Problem) var.getProblem();
    problem.defineConstraintImpl(this, cVar, oper, value);
  }
View Full Code Here

    super(vars[0].getProblem(), name);
    Problem problem = (Problem) vars[0].getProblem();
    Constrainer constrainer = problem.getConstrainer();
    IntExpArray intvars = new IntExpArray(constrainer, vars.length);
    for (int i = 0; i < vars.length; i++) {
      IntExp cvar = (IntExp) vars[i].getImpl();
      intvars.set(cvar, i);
    }
    IntExp scalProd = constrainer.scalarProduct(intvars, values);
    problem.defineConstraintImpl(this, scalProd, oper, value);
  }
View Full Code Here

TOP

Related Classes of com.exigen.ie.constrainer.IntExp

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.