Interface AmplModel

All Known Implementing Classes:
AbstractAmplModel

public interface AmplModel
Interface to represent an Ampl model to run on a network.

The AMPL must read/write files according to AmplExporter/AmplNetworkReader.

Some customization is available through :

Author:
Nicolas Pierre <[email protected]>
  • Method Details

    • getModelAsStream

      List<org.apache.commons.lang3.tuple.Pair<String,InputStream>> getModelAsStream()
      Returns:
      each pair contains the name, and the InputStream of every ampl file of the model (.run .dat .mod)
    • getAmplRunFiles

      List<String> getAmplRunFiles()
      Returns:
      the list of the files to run in Ampl (.run files)
    • getOutputFilePrefix

      String getOutputFilePrefix()
    • getNetworkUpdaterFactory

      AmplNetworkUpdaterFactory getNetworkUpdaterFactory()
    • getVariant

      int getVariant()
      Returns:
      network variant to export for the Ampl solve
    • getOutputFormat

      OutputFileFormat getOutputFormat()
    • getNetworkDataPrefix

      String getNetworkDataPrefix()
    • getAmplReadableElement

      Collection<AmplReadableElement> getAmplReadableElement()
      Returns:
      list of AmplReadableElement to read after the Ampl run, it implies that the Ampl model outputs these files with the correct format
    • checkModelConvergence

      boolean checkModelConvergence(Map<String,String> metrics)
      From the metrics read, tells if the model has converged or not.
      Parameters:
      metrics - output written by the ampl model
      Returns:
      true if the metrics indicates that the ampl converged.
      See Also: