CREE-VARLISTE
Arguments: dom longueur [generic-function]
cree-varliste dom longueur
[generic-function]
Defines a constraint problem (csp) with a list of longueur variables ranging over he domains dom, 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 patchforvarliste.
The first output give the csp (instance of the asvarliste)
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-varliste and patchforvarliste
Inputs :
dom : a list, representing the possible values for the variables
longueur : the number of variables
[generic-function]
Defines a constraint problem (csp) with a list of longueur variables ranging over he domains dom, 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 patchforvarliste.
The first output give the csp (instance of the asvarliste)
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-varliste and patchforvarliste
Inputs :
dom : a list, representing the possible values for the variables
longueur : the number of variables
Outputs:
the csp (instance of asvraliste)
the current values of the variables
the csp (instance of asvraliste)
the current values of the variables
as-varliste
[class]
Class of the csp with variables placed in a list.
The slots of the class are :
valeurs (a list) : the list of current values of the variables
domaines (a list) : the domain (same for all 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-varliste is defined from cree-varliste 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 csp with variables placed in a list.
The slots of the class are :
valeurs (a list) : the list of current values of the variables
domaines (a list) : the domain (same for all 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-varliste is defined from cree-varliste they are generated from what is defined in the associated patch.
cont-glob : aggregation of all the constraints for the whole configuration
patchforvarliste
[class]
These patches are opened when double clicking on the cree-varliste boxes.
They are used to define the constraints of the associated csp, which is an instance of as-varliste.
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 reprensented 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.
[class]
These patches are opened when double clicking on the cree-varliste boxes.
They are used to define the constraints of the associated csp, which is an instance of as-varliste.
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 reprensented 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.
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