Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freeday constraint is not honoured #2

Open
thureduehrsen opened this issue Sep 3, 2019 · 2 comments
Open

freeday constraint is not honoured #2

thureduehrsen opened this issue Sep 3, 2019 · 2 comments

Comments

@thureduehrsen
Copy link

In the sample reqs.xml file, make it so that teacher ume1 has free days on all five weekdays:

	<freeday teacher="ume1" day="1"/>
        <freeday teacher="ume1" day="2"/>
        <freeday teacher="ume1" day="3"/>
        <freeday teacher="ume1" day="4"/>
	<freeday teacher="ume1" day="5"/>

Then have Prolog generate a timetable:

Teacher: ume1

  Mon     Tue     Wed     Thu     Fri   
========================================
                                 1c/ume 
                 1a/ume                 
                 1d/ume                 
 1c/ume                                 
                         1b/ume         
                         1d/ume  1a/ume 
 1b/ume                                 

The teacher's timetable should be empty, but it is not.

@thureduehrsen
Copy link
Author

Should a warning be generated, or an error?

In general, what should happen if I provide inconsistent requirements, or redundant ones?

triska added a commit that referenced this issue Sep 3, 2019
Reported by Thure Dührsen. Many thanks!
@triska
Copy link
Owner

triska commented Sep 3, 2019

Many thanks! I have installed a change that corrects this, please have a look.

If the requirements are inconsistent, the predicate can simply fail, indicating that there is no solution. For redundant ones, a warning may be useful, but it is not strictly needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants