All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.constraints.impl.search.StrategyLogVariables Maven / Gradle / Ivy

Go to download

JCP Standard JSR331 “Java Constraint Programming API”. It is used for Modeling and Solving Constraint Satisfaction and Optimization Problems using Java and off-the-shelf Constraint/Linear Solvers

The newest version!
package javax.constraints.impl.search;

import javax.constraints.Solver;
import javax.constraints.Var;

public class StrategyLogVariables extends AbstractSearchStrategy {
	Var[] vars;
	
	public StrategyLogVariables(Var[] vars) {
		super(vars[0].getProblem().getSolver());
		this.vars = vars;
		setType(SearchStrategyType.CUSTOM);
	}
	
	public StrategyLogVariables(Solver solver) {
		super(solver);
		vars = getProblem().getVars();
		setType(SearchStrategyType.CUSTOM);
	}
	
	public boolean run() {
		getProblem().log("=== StrategyLogVariables:");
		getProblem().log(vars);
		return true;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy