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

org.chocosolver.parser.IParser Maven / Gradle / Ivy

There is a newer version: 4.10.17
Show newest version
/*
 * This file is part of choco-parsers, http://choco-solver.org/
 *
 * Copyright (c) 2024, IMT Atlantique. All rights reserved.
 *
 * Licensed under the BSD 4-clause license.
 *
 * See LICENSE file in the project root for full license information.
 */
package org.chocosolver.parser;

import org.chocosolver.solver.Model;

/**
 * An interface for all parsers
 * 
* * @author Charles Prud'homme * @version choco-parsers * @since 21/10/2014 */ public interface IParser { /** * Set up the concrete class with the arguments defined by args. * @param args arguments to set up the concrete class. * @throws SetUpException if one or more argument is not valid. * @return true if argument parsing goes right */ boolean setUp(String... args) throws SetUpException; /** * Action to run on exit. */ default void tearDown(){} /** * Call the model creation. *
    *
  • add variables
  • *
  • post constraints
  • *
  • (for optimization problems) define the objective(s) here or later in {@link #configureSearch()})
  • *
*/ void buildModel(); /** * Call search configuration. * For optimization problems, define the objective if it has not been done in {@link #buildModel()}. */ void configureSearch(); /** * Call problem resolution. * For optimization problems, the objective(s) must be defined before this call. */ void solve(); /** * @return a thread to execute on unexpected exit */ Thread actionOnKill(); /** * Get the solver * * @return solver */ Model getModel(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy