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

How to save result into txt file #1

Open
Mus54 opened this issue May 8, 2016 · 1 comment
Open

How to save result into txt file #1

Mus54 opened this issue May 8, 2016 · 1 comment

Comments

@Mus54
Copy link

Mus54 commented May 8, 2016

Hello,
First, thank you for this progam
I see that this program output is displayed on the console.
If we need to save it, we'll need to a datastructure.
I don't konw how to do it because you've used the format/2 predicate to display it.
Could you tell me how to save it without executing command line please ?
Sorry for my bad English
Thank you

@triska
Copy link
Owner

triska commented May 8, 2016

Nice idea!

In f6f962e, I have added a pure interface to access the requirements and solutions. For example:

?- timetable_('reqs.xml', Rs, Vs), labeling([ff], Vs).
Rs = [req('1a', anj, anj1, 3)-[3, 9, 16], req('1a', atvz, atvz1, 3)-[4, 10, 25], req('1a', bio, bio1, 2)-[11, 26], req('1a', fiz, fiz1, 2)-[13, 27], req('1a', geo, geo1, 2)-[17, 32], req('1a', kem, kem1, 2)-[18, 33], req('1a', mat, mat1, 5)-[2|...], req(..., ..., ..., ...)-[...|...], ... - ...|...],
Vs = [3, 9, 16, 4, 10, 25, 11, 26, 13|...] .

Please let me know if you have any questions about this.

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