Skip to content

Optimization-Algorithms/feasth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

feasth

Rust

Easily compute statistics about Feature Kernel

Compile

This program can be easily tested and compiled using cargo. To test run:

cargo test

To compile the optimized executable, run:

cargo build --release

The result will be located into directory target/release, the executable name depends on the platform:

  • feasth on Unix
  • feasth.exe on Windows

Usage

To get the global help message run:

feasth --help

feasth is designed to compute indexes from the log file generated by Feature Kernel. It is possible to compute feasibility thresholds or usage ratios.

To compute any value feasth needs the size of the mip model. This size can be provided to feasth in three ways:

  1. using --model option: give the mps file and let feasth compute the size from the model file. This procedure is not completly reliable, use it only as last resort.
  2. using --size option: pass directly the model size to feasth. It's user's responsability to check the correctness of this value.
  3. using --auto flag: let feasth search the size online (on miplib). This search is done using the name of the log file it must be in the format INSTANCE_NAME-init.csv, so feasth can search for INSTANCE_NAME automatically. ---auto does not work if the log file name is not in this format or INSTANCE_NAME is not an instance on MipLib.

Feasibility Threshold

feasth used with thresh computes Integer Feasibility Threshold(IFT) and Continuos Feasibility Threshold(CFT).

For example:

feasth thresh problem-init.csv -s 1234 

will print IFT and CFT on the console then exit.

It is possible to automatically output to file, using the -o:

feasth thresh problem-init.csv -a -o problem-into.txt

in this case model size is get automatically from the internet.

It is possible to get the help message for this specific command:

feasth thresh --help

Usage Ratio

feasth run with command ratio computes the usage ratio for each sub problem present in the given log file (same file as thresh) and returns a CSV, the first field is the usage ratio itself and the second is the status (directly copied from the log file).

Example:

feasth ratio problem-init.csv -m problem.mps

computes model size parsing problem.mps then computes the ratios and outputs the csv directly to the console.

It is also possible to output directly to a file using the -o flag:

feasth ratio problem-init.csv -a -o problem-ratio.csv

It is possible to get the help message for this specific command:

feasth ratio --help

Note

Note that ratio and thresh share the same inner arguments. Anything that can be used and accepted from one command can be automatically accepted by the other.