parser.instances
Class XcspModel

java.lang.Object
  extended by parser.instances.AbstractInstanceModel
      extended by parser.instances.XcspModel

public class XcspModel
extends AbstractInstanceModel

User: charles Date: 19 août 2008

A class to provide facilities for loading and solving CSP described in the xml format of the 2008 competition


Field Summary
 
Fields inherited from class parser.instances.AbstractInstanceModel
dbManager, defaultConf, LOGGER, logMsg, model, objective, parser, solver
 
Constructor Summary
XcspModel()
           
XcspModel(XcspSettings settings)
           
 
Method Summary
 Model buildModel()
          create the choco model after the preprocessing phase.
 Solver buildSolver()
          create a solver from the current model
static boolean checkEverythingIsInstantiated(InstanceParser parser, Solver s)
           
 void checkSolution()
          The method checks the validity of the solution.
 String getValuesMessage()
           
 XcspSettings getXcspSettings()
           
 void initialize()
           
protected  void logOnConfiguration()
           
protected  void logOnDiagnostics()
           
 Boolean preprocess()
          Executes preprocessing ( bounding, heuristics ...)
 Boolean solve()
          configure and launch the resolution.
 
Methods inherited from class parser.instances.AbstractInstanceModel
applyCP, checkIsSatisfied, checkStatus, consoleReport, databaseReport, getBuildTime, getConfiguration, getConfTime, getDatabaseManager, getFullSecTime, getFullTime, getInitialObjectiveValue, getInstanceName, getModel, getObjectiveValue, getOutputDirectory, getParser, getParseTime, getPreProcTime, getResTime, getSeed, getSolver, getStatus, isDatabaseReporting, isFeasible, load, makeReports, postAnalyzeCP, postAnalyzePP, setDatabaseManager, setObjective, solveFile, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XcspModel

public XcspModel()

XcspModel

public XcspModel(XcspSettings settings)
Method Detail

getXcspSettings

public final XcspSettings getXcspSettings()

initialize

public void initialize()
Overrides:
initialize in class AbstractInstanceModel

buildModel

public Model buildModel()
Description copied from class: AbstractInstanceModel
create the choco model after the preprocessing phase.

Specified by:
buildModel in class AbstractInstanceModel

buildSolver

public Solver buildSolver()
Description copied from class: AbstractInstanceModel
create a solver from the current model

Specified by:
buildSolver in class AbstractInstanceModel

getValuesMessage

public String getValuesMessage()
Overrides:
getValuesMessage in class AbstractInstanceModel

preprocess

public Boolean preprocess()
Description copied from class: AbstractInstanceModel
Executes preprocessing ( bounding, heuristics ...) default implementation: do nothing.

Specified by:
preprocess in class AbstractInstanceModel
Returns:
true if a solution has been found, false if the infeasibility has been proven and null otherwise.

solve

public Boolean solve()
Description copied from class: AbstractInstanceModel
configure and launch the resolution.

Specified by:
solve in class AbstractInstanceModel

checkEverythingIsInstantiated

public static boolean checkEverythingIsInstantiated(InstanceParser parser,
                                                    Solver s)

checkSolution

public void checkSolution()
                   throws SolutionCheckerException
Description copied from class: AbstractInstanceModel
The method checks the validity of the solution. The default implementation only uses the embedded checker. So, the solution is not validated by an external program.

Overrides:
checkSolution in class AbstractInstanceModel
Throws:
SolutionCheckerException

logOnDiagnostics

protected void logOnDiagnostics()
Overrides:
logOnDiagnostics in class AbstractInstanceModel

logOnConfiguration

protected void logOnConfiguration()
Overrides:
logOnConfiguration in class AbstractInstanceModel


Copyright © 2012. All Rights Reserved.