

grams of butter available int : cocoa %no. grams of sugar available int : butter %no. grams of flour available int : banana %no. % Baking cakes for the school fete (with data file) int : flour %no. The type of the values is integer so all of the variables in the model are integer decision variables. Thus each of ourĭecision variables is declared to have the domain 1. In our MiniZinc model we use integers to model the different colours. Type of the decision variable is inferred from the type of the values in the domain.Ĭan be Booleans, integers, floating point numbers,Īlso supported are arrays whose elements are This can be given as part of the variable declaration and the Which stands for the (unknown) colour to be used to fill the region.įor each decision variable we need to give the set of possible values the In our example model we associate a decision variable with each region, MiniZinc model is executed that the solving system determines if theĭecision variable can be assigned a value that satisfies the constraints in the Rather the value of a decision variable is unknown and it is only when the Modeller does not need to give them a value. Unlike parameters and variables in a standard programming language, the MiniZinc models can also contain another kind of variable called aĭecision variables are variables in the sense of mathematical or logical


It is an error for a parameter to occur in more than one assignment. Single value, in that sense they are named constants. Unlike variables in many programming languages a parameter can only be given a
