Solver Foundation supports flexible data binding so that the algebraic model can be separated from the data source. In Solver Foundation, both parameters and decisions can be bound to data source. It makes writing and maintaining models really easy. To bind a parameter to a data source, we usually need to specify the data source,…

# Tag: Data Binding

## Using Solver Foundation to generate Sudoku puzzles, Part II

In our last post, we saw the model for completing a Sudoku board given a particular board configuration. In this post, we will show how to repeatedly use this model to generate a Sudoku puzzle. Let us first take a look at the main procedure of the puzzle generation. Public Function GeneratePuzzle() As SudokuBoardCell(,) …

## Arithmetics on indexes in OML

Here is the link to the original post (thank Shahar for posting the trick). The trick to make arithmetics valid on Decision/Parameter indexes in OML is to declare the Sets on which the indexes are defined as Integers. Here is the OML model that illustrates how arithmetics is done. Model[ //define the set as an…

## Use Scalar Parameters for SFS Data Binding in F#

Parameters in Solver Foundation Services (SFS) provide a convenient way of separating models from their input data. In the MSF-SFSProgrammingPrimer doc included in the release, we have the following example: Sample 4: Using Parameters for LINQ Data Binding Often we will want to iteratively run the same model with different data parameters. Instead of recreating the same model…

## Using Solver Foundation to generate Sudoku puzzles, Part I

I will be posting a series of articles that illustrate how to use the recently released Microsoft Solver Foundation to solve various problems. Let us start with this fun problem: generating Sudoku puzzles. We will see how to model the problem in Solver Foundation and how to drive the creation of Sudoku puzzles from Excel spreadsheet via Excel plug-in….