alteryx / AlteryxPrescriptive

R Package for Optimization in Alteryx
GNU General Public License v3.0
3 stars 6 forks source link

Input error handling #17

Open kuol opened 8 years ago

kuol commented 8 years ago

Matrix Mode:

Input O:

Slam matrix:

Dense matrix:

This is an optional input, there is an option to combine integrate Input B to Input A:

ramnathv commented 8 years ago

Some more notes on this issue. It repeats some of what we already have. We need to consolidate it.

O input

  1. should always have two fields named variable and coefficient.
  2. can additionally have column named
    • type, which must take values in C, I, B.
    • lb, to indicate lower bound.
    • ub to indicate upper bound.
    • description for a more detailed description that appears in the report.
  3. user can optionally add any number of additional columns with information.

A input

  1. any columns other than constraint, name, dir, rhs, description will be considered the coefficient matrix.
  2. any rows named dir, rhs or description in the variable column will be treated specially.
  3. logic for recognizing type of matrix:
    • if there are only three columns named i, j and v, then slam, constraints in rows.
    • if there is a column named variable, then it is dense_variable
    • otherwise, it will be interpreted as dense_constraints

Rules:

Lining up Variables

  1. If A matrix does not have a column named variable or constraint, then the columns corresponding to the constraint matrix will be assumed to be in the same order as the variables in the O matrix.
  2. Dense_Contraint -> Column names MUST be identical to those in the O matrix
  3. Dense_Variable <- Column named variable should have identical values to the column named variable in the O matrix.

Lining Constraints

  1. Constraints are assumed to be in the same order as the A matrix.