Skip to main content

    Ideas pipeline

    110 Ideas

    gdiepen
    AIMMS Champ
    gdiepenAIMMS Champ

    Add support for fuzzy matching/searching when have searchbox for identifier in webuiDiscussion ongoing

    Especially when models become big and you have quite some identifiers, the standard search widget (e.g. when adding identifiers to a widget, or finding the identifier to be used as identifier for side panel in a page) can be tricky to work with.One of the problems is that the match is based on exact match of your search-expression with a part of the identifier name. Especially if you have some identifiers that share a same start, it might become more difficult to find them, partially because of the second problemThe second problem I have is that the width of the window of the of the matching identifiers is not too wide. Over the years, I started to give my identifiers relative describing names. Combined with for example the fact I might use additional prefixes to group more identifiers together, the names can become relatively long. This means for sure I will not see the indices of the matching identifiers anymore, but sometimes not even the last characters (on the other hand, why use super cryptic short names for your identifiers if you can have names that make it directly clear what data they represent) It would be very nice if besides the current default behavior of searching based on returning matches based on occurrence of the exact search key in the identifier name, you could also have an ‘advanced’ way of searching, namely by using fuzzy searching. This way, you search for an identifier likepAwesomeIdentifierHoldingDemandDatabased on a search strings like“Awme Demand” “demand awesome” or any type of fuzzy matching combination.I have changed my way of working both in my editor and in the terminal to be based on fuzzy matching (using the tool FZF) and it makes finding things a lot easier if you know a couple of items in the name, not necesarily in the right order.It could be a setting in the developer version of AIMMS to indicate that during development you want to keep using the old way of searching, or using a fuzzy matching.   

    Sree
    SreeEnthusiast

    Automatically add slacks and resolve an infeasible modelImplemented

    AbstractA functionality within the modeling language to relax a constraint and/or variable bound and re-solve will save development time as well as provide control to the decision-maker(s) when a particular instance of a math programming model is infeasible. One candidate solution is to introduce a suffix for constraints that allows for this functionality. MotivationAn instance of a math programming model can be infeasible due to a particular set of parameter values. It may be that not all parameters are certain or that not all constraints and/or variable bounds are hard. Tools like Irreducible Infeasible Set (IIS) in MIP solvers help the expert understand and debug the model formulation. They do not necessarily offer a practical way to parse the information and report the finding to the end-user/decision-maker. In practice, adding a set of slack variables (note: for a lack of better terminology, using the term slack here to denote the slack required in a constraint to make it feasible; not to be confused with slack variables in linear programming) to constraints and setting up a feasibility problem (to minimize total slack required or other appropriate measure) is more approachable to provide control to the end-user. However, this requires the following.Slack variables are declared and added to the relevant constraints. Identifiers are declared and used as bounds for variables. An appropriate objective is defined to setup the feasibility problem. Math program is setup to exclude the variables while solving for the original objective and include the variables while solving for the feasibility problem either by manipulating the definition of a subset of AllVariables (corresponding to the slacks) that defines the math program, or fixing the slack variables to zero and relaxing them. All the information required to define the feasibility problem may not be available at the time developing the first math programming model and during subsequent iterations. It can be time-consuming during development or lead to errors while manually updating the model. Further, it may destroy the structure of the problem to develop advanced algorithms later on (at least when using the approach of fixing the slack variables to zero and then relaxing them later). Solution CandidateAdd a functionality in the AIMMS modeling language to relax a constraint or variable bound by introducing a new suffix for constraints and variables. Maintain a one-to-one feasibility model behind the scenes and solve it when requested. MIP solvers like CPLEX and Gurobi already support this natively (GRBModel.FeasRelax() - Gurobi Optimization and IBM Documentation - IBM Documentation). Alternatively, generate a model with slacks as a runtime library somehow and generalize it for other types of math programs. The suffix denoting the relaxation could consider non-binary values to also represent a priority order or even the objective function coefficient corresponding to the constraint/variable bound for the feasibility problem.

    Didn't find what you were looking for? Try searching on our documentation pages:

    AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator