Package com.exigen.ie.constrainer

Examples of com.exigen.ie.constrainer.Constrainer


  }

  public Linear(Var[] vars, String oper, int value) {
    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 sum = constrainer.sum(intvars);
    problem.defineConstraintImpl(this, sum, oper, value);
  }
View Full Code Here


  }

  public Linear(int[] values, Var[] vars, String oper, Var var) {
    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, var);
  }
View Full Code Here

  }

  public Linear(Var[] vars, String oper, Var var) {
    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 sum = constrainer.sum(intvars);
    problem.defineConstraintImpl(this, sum, oper, var);
  }
View Full Code Here

TOP

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

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.