generated from potassco/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from potassco/clc_sum
Pimp readme, change language
- Loading branch information
Showing
45 changed files
with
818 additions
and
1,641 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#const n = 8. | ||
time(0..n). step(I,I+1) :- time(I), I < n. | ||
|
||
&fsum {s(I)+D} =: s(I') :- acc(D,I'), step(I,I'). | ||
&fsum {s(I)-D} =: s(I') :- slow(D,I'), step(I,I'). | ||
&sus {s(I)+D} =: s(I') :- acc(D,I'), step(I,I'). | ||
&sus {s(I)-D} =: s(I') :- slow(D,I'), step(I,I'). | ||
|
||
&fsum {s(I)} =: s(I') :- not &fsum{ s(I') } != s(I), step(I,I'). | ||
&sus {s(I)} =: s(I') :- not &sus{ s(I') } != s(I), step(I,I'). | ||
|
||
&fsum {p(I)+s(I)} =: p(I') :- step(I,I'). | ||
&sus {p(I)+s(I)} =: p(I') :- step(I,I'). | ||
|
||
&fsum {400000} =: rdpos. | ||
&fsum {90000} =: rdlimit. % <<< ADDED <<< | ||
&sus {400000} =: rdpos. | ||
&sus {90000} =: rdlimit. % <<< ADDED <<< | ||
|
||
fine(I') :- &fsum{ p(I) } < rdpos, &fsum{ p(I') } >= rdpos, step(I,I'), | ||
&fsum{ s(I') } > rdlimit. | ||
fine(I') :- &sus{ p(I) } < rdpos, &sus{ p(I') } >= rdpos, step(I,I'), | ||
&sus{ s(I') } > rdlimit. | ||
|
||
&fsum {0} =: p(0). | ||
&fsum {80000} =: s(0). | ||
&sus {0} =: p(0). | ||
&sus {80000} =: s(0). | ||
|
||
acc(11350,4). | ||
slow(2301,6). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
price(frame,15). | ||
|
||
|
||
selected(frame). | ||
{ selected(bag) }. | ||
|
||
&sus{V} = price(P) :- selected(P), price(P,V). | ||
&sus{price(P) : selected(P)} =: price(total). | ||
|
||
#show selected/1. | ||
&show{price/1}. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
price(frame,15). | ||
|
||
selected(frame). | ||
{ selected(bag) }. | ||
|
||
&sus{V} = price(P) :- selected(P), price(P,V). | ||
&sus{price(P)} = 1 :- selected(P), not price(P,_). | ||
&sus{price(P) : selected(P)} =: price(total). | ||
|
||
#show selected/1. | ||
&show{price/1}. |
Oops, something went wrong.