CREE-VARPERM
Arguments: init [generic-function]
cree-varperm init
[generic-function]
Defines a permutation constraint problem (csp) with the variables being permutations of the list given in the input and the constraints have to be defined in the associated patch (double click on the icon to open it). This patch is an instance of patchforvarperm. The domain of the csp is the set of all permutations of the variables.
The first output give the csp (instance of the asvarperm)
The second output gives the current values of the variables (random if no resolution has been made).
See below the documentation of the classes as-varperm and patchforvarperm
[generic-function]
Defines a permutation constraint problem (csp) with the variables being permutations of the list given in the input and the constraints have to be defined in the associated patch (double click on the icon to open it). This patch is an instance of patchforvarperm. The domain of the csp is the set of all permutations of the variables.
The first output give the csp (instance of the asvarperm)
The second output gives the current values of the variables (random if no resolution has been made).
See below the documentation of the classes as-varperm and patchforvarperm
Inputs :
init : the list of variables
init : the list of variables
Outputs:
the csp (instance of asvraperm)
the current values of the variables
the csp (instance of asvraperm)
the current values of the variables
as-varperm
[class]
Class of the permutation csp. Note that this class has no domain slot (contrary to as-varliste and as-varcycle), it is not necessary to define a domains for the variables since we know that the domain of the csp is the set of all permutations of the variables.
The slots of the class are :
valeurs (a list) : the list of current values of the variables
erreurs (a list) : the list of errors for each variable with regard to the constraints
erreur-global (an integer) : the error of the whole configuration with regrd to the constraints, which is the sum of all erreurs
tabu : the list of the variables marked as tabu (during the resolution, useless if you don't care about the detail of the resolution process)
longueur (an integer) : the number of variables
contraintes : the constraints. In case the as-varperm is defined from cree-varperm they are generated from what is defined in the associated patch.
cont-glob : aggregation of all the constraints for the whole configuration
[class]
Class of the permutation csp. Note that this class has no domain slot (contrary to as-varliste and as-varcycle), it is not necessary to define a domains for the variables since we know that the domain of the csp is the set of all permutations of the variables.
The slots of the class are :
valeurs (a list) : the list of current values of the variables
erreurs (a list) : the list of errors for each variable with regard to the constraints
erreur-global (an integer) : the error of the whole configuration with regrd to the constraints, which is the sum of all erreurs
tabu : the list of the variables marked as tabu (during the resolution, useless if you don't care about the detail of the resolution process)
longueur (an integer) : the number of variables
contraintes : the constraints. In case the as-varperm is defined from cree-varperm they are generated from what is defined in the associated patch.
cont-glob : aggregation of all the constraints for the whole configuration
patchforvarperm
[class]
These patches are opened when double clicking on the cree-varperm boxes.
They are used to define the constraints of the associated csp, which is an instance of as-varperm.
We make the assumption that the constraints are always defined in the same way for all the variables. So they state on any variable (input written i), and possibly the following ones, which you can make appear by clicking on the second button in the up-right corner.
[class]
These patches are opened when double clicking on the cree-varperm boxes.
They are used to define the constraints of the associated csp, which is an instance of as-varperm.
We make the assumption that the constraints are always defined in the same way for all the variables. So they state on any variable (input written i), and possibly the following ones, which you can make appear by clicking on the second button in the up-right corner.
The whole list of variables is represented by the liste icon.
The constraints have to be connected to the state output. If you want to add constraints, you can either use the andc primitive to combine them or state them seperately, for this you need to add outputs by clicking on the state button in the up-right corner.
The constraints have to be connected to the state output. If you want to add constraints, you can either use the andc primitive to combine them or state them seperately, for this you need to add outputs by clicking on the state button in the up-right corner.
There are several kinds of predefined inputs :
i : denotes any variable
i+1, i+2, i+3, etc : the variables that follow i
i : denotes any variable
i+1, i+2, i+3, etc : the variables that follow i
Output :
state : connect the constraints here
state : connect the constraints here