Last active
November 21, 2018 14:48
-
-
Save AntoineDrouhin/e25caa0c5e2ea9889448f31fb968b65b to your computer and use it in GitHub Desktop.
Paris1 Product line course / Prolog / Printer Product Line Model.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printer(L) :- | |
L= [ | |
Root, | |
% Print functions | |
Print, | |
IncPrint, | |
LazerPrint, | |
IncBnW, | |
LazerBnW, | |
IncColor, | |
LazerColor, | |
BothSides, | |
BothSidesAutomatic, | |
BothSidesManual, | |
%Connection functionnalities | |
ConnectionDevice, | |
Usb, | |
Wireless, | |
Bluetooth, | |
Wifi | |
], | |
fd_domain(L, 0, 1), | |
% root_constraint | |
Root #= 1, | |
% mandatory_relationships | |
Root #= Print, | |
LazerPrint #= LazerBnW, | |
IncPrint #= IncBnW, | |
% optional_relationships | |
Root #>= ConnectionPC, | |
IncPrint #>= Print, | |
LazerPrint #>= Print, | |
Print #>= BothSides, | |
BothSides #>= BothSidesAutomatic, | |
BothSides #>= BothSidesManual, | |
IncPrint #>= IncColor, | |
LazerPrint #>= LazerColor, | |
% group_cardinality | |
% Root #>= F2, | |
% Root #>= F3, | |
% Root #>= F4, | |
% Root #=< F2 + F3 + F4, | |
% F2+ F3+ F4 #=< Root, | |
%mutex | |
IncPrint * LazerPrint #= 0, | |
BothSidesAutomatic * BothSidesManual #= 0, | |
% F3 * F8 #= 0, | |
% F3 * F5 #= 0, | |
%requires | |
% F7 #>= F8, | |
% F8 #==> F7, | |
% F9 #>= F5, | |
% F5 #==> F9, | |
fd_labeling(L). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment