This app provides a Development Environment to program a wide class of problems which have Integer solutions
This app provides a Development Environment to program a wide class of problems which have Integer solutions. It uses a technique called Constraint Programming. The tools provided by this technique are designed to allow non-specialists to address problems in a variety of domains including planning & optimization, scheduling, logistics, financial analysis, bioinformatics etc. More importantly it can be used for fun and learning.Constraint programming falls under the umbrella of Declarative Progra
mming paradigm. It allows relations between variables to be stated in the form of constraints, specifying the properties of a solution to be found. The set of constraints are then solved by the engine by giving a value to each variable so that the solution is consistent with maximum number of constraints.The app comes pre-installed with 25 problems & solutions to demonstrate the technique. Besides more problems will be continuously added to the cloud database by the community.1. Printed Circuit Board - Path Finding2. Enigma - Cryptarithmetic3. Logic Squares - Puzzle4. Furniture Loading - Critical Path5. Lying Monks - Logic6. Logic Blocks - Packing Puzzle7. Interview Scheduling8. Bales of Hay9. Balanced Diet - Optimization10. Photo shoot - Puzzle11. Marathon - Puzzle12. Magic Sequence13. Survo Puzzle14. Lights On15. Zebra Puzzle16. Knapsack Value17. Dollar Change18. N Queens19. Sudoku20. Knights Tour21. Map Colouring - 4 colour theorem22. Least Difference23. Travelling Salesman Problem24. Send More Money - Cryptarithmetic25. Balancing Equations - Equation SolvingNote: Given the constraints of a small device, the app is more of 'Toy' for enthusiasts and students rather than a tool for solving real life problems. While the solutions can run on a smaller device, writing a solution itself is more convenient with more screen real estate at your disposal. So 'Tablets' are preferred.Steps to Modelling and Solving------------------------------------------------Execution happens in two steps.1. Model Definition Execution in this phase happens outside solver engine. The objective of this phase is to make calls to the solver engine to define the model. - Identify variables that help define the problem. Name the variables and register them with the Engine through Define Commands - Constrain the variables and their interrelationships. - Define the goal. It could be one of the following - - Find a Feasible solution. - Find the count of feasible solutions. - Maximize/Minimize an objective (a variable). - And, of course put lots of comments in the code.2. Model ExecutionThe call to 'findSolution' transfers the execution control to the solver engine. The control returns only when the Solver has resolved the variables i.e. assigned values to them.Important Notes--------------------------- As in most popular programming languages, all indices start from zero i.e. the first element in the collection is referred by the 0'th index.- All ranges are closed ended i.e. both the first and the last entries are included in the range.- While converting a two dimensional structure like a grid into a one dimensional structure like an array, the order of reading/parsing is left to right and top to bottom.App Controls---------------------- To see problem details, longtap on a local problem.- To download a cloud problem, longtap on the problem. You cannot directly work on a cloud problem until you download it locally.- To open a local existing solution, go to problem details tap 'Solutions' and choose 'Local'. Then longtap on one of the solutions to open it.- To download a cloud solution, go to problem details tap 'Solutions' and choose 'Cloud'.Then longtap on one of the solutions to download it.- To 'Run', 'Publish', 'Save' etc. a Solution longtap on the white space outside the programming blocks to reveal a context menu.
... moreless ...