Skip to content

Commit

Permalink
swapped equality direction
Browse files Browse the repository at this point in the history
  • Loading branch information
wanko committed Nov 10, 2023
1 parent 0ae1471 commit 55d49e4
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ price(bag,5).
selected(frame).
{ selected(bag) }.
&sum{price(P)} = V :- selected(P), price(P,V).
&sum{V} = price(P) :- selected(P), price(P,V).
&sum{price(P) : selected(P)} = price(total).
#show selected/1.
Expand Down Expand Up @@ -76,7 +76,7 @@ pricelimit(14).
selected(frame).
{ selected(bag) }.
&sum{price(P)} = V :- selected(P), price(P,V).
&sum{V} = price(P) :- selected(P), price(P,V).
:- &sum { price(P) : selected(P) } >= L,
pricelimit(L).
Expand Down Expand Up @@ -109,7 +109,7 @@ pricelimit(14).
selected(frame).
{ selected(bag) }.
&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
:- &sus { price(P) : selected(P) } >= L,
pricelimit(L).
Expand Down Expand Up @@ -142,7 +142,7 @@ default_range(1,2).
selected(frame).
{ selected(bag) }.
&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&in{L..U} =: price(P) :- selected(P), not price(P,_),
default_range(L,U).
&sus{price(P) : selected(P)} =: price(total).
Expand Down Expand Up @@ -181,7 +181,7 @@ default_price(20).
selected(frame).
{ selected(bag) }.
&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&sus{price(P) : selected(P)} =: calc_price(total).
&sus{price(total)} = calc_price(total) :- &df{calc_price(total)}.
Expand Down Expand Up @@ -217,7 +217,7 @@ price(bag,5). part(bag).
selected(frame).
{ selected(bag) }.
&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&sus{price(P) : selected(P)} = price(total).
min_price(P) :- &min{price(P') : selected(P')} = price(P),
Expand Down Expand Up @@ -262,7 +262,7 @@ part(standardframe). price(standardframe,14). type(frame,frame).
part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle).
part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle).
&sum{price(P)} = V :- price(P,V).
&sum{V} = price(P) :- price(P,V).
pricelimit(20).
Expand Down
2 changes: 1 addition & 1 deletion examples/config_assignment.lp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ price(frame,15).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&sus{price(P) : selected(P)} =: price(total).

#show selected/1.
Expand Down
2 changes: 1 addition & 1 deletion examples/config_default.lp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ price(frame,15).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&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).

Expand Down
2 changes: 1 addition & 1 deletion examples/config_default_df.lp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_price(20).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&sus{price(P) : selected(P)} =: calc_price(total).

&sus{price(total)} = calc_price(total) :- &df{calc_price(total)}.
Expand Down
2 changes: 1 addition & 1 deletion examples/config_default_in.lp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_range(1,2).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&in{L..U} =: price(P) :- selected(P), not price(P,_),
default_range(L,U).
&sus{price(P) : selected(P)} =: price(total).
Expand Down
2 changes: 1 addition & 1 deletion examples/config_maxlimit_choice.lp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ part(standardframe). price(standardframe,14). type(frame,frame).
part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle).
part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle).

&sum{price(P)} = V :- price(P,V).
&sum{V} = price(P) :- price(P,V).

maxlimit(14).

Expand Down
2 changes: 1 addition & 1 deletion examples/config_minmax_price.lp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ price(bag,5). part(bag).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
&sus{price(P) : selected(P)} = price(total).

min_price(P) :- &min{price(P') : selected(P')} = price(P),
Expand Down
2 changes: 1 addition & 1 deletion examples/config_optional.lp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ price(bag,5).
selected(frame).
{ selected(bag) }.

&sum{price(P)} = V :- selected(P), price(P,V).
&sum{V} = price(P) :- selected(P), price(P,V).
&sum{price(P) : selected(P)} = price(total).

#show selected/1.
Expand Down
2 changes: 1 addition & 1 deletion examples/config_pricelimit_choice.lp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ part(standardframe). price(standardframe,14). type(frame,frame).
part(fancysaddle). price(fancysaddle,6). type(fancysaddle,saddle).
part(standardsaddle). price(standardsaddle,5). type(standardsaddle,saddle).

&sum{price(P)} = V :- price(P,V).
&sum{V} = price(P) :- price(P,V).

pricelimit(20).

Expand Down
2 changes: 1 addition & 1 deletion examples/config_pricelimit_sum.lp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pricelimit(14).
selected(frame).
{ selected(bag) }.

&sum{price(P)} = V :- selected(P), price(P,V).
&sum{V} = price(P) :- selected(P), price(P,V).
:- &sum { price(P) : selected(P) } >= L,
pricelimit(L).

Expand Down
2 changes: 1 addition & 1 deletion examples/config_pricelimit_sus.lp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pricelimit(14).
selected(frame).
{ selected(bag) }.

&sus{price(P)} = V :- selected(P), price(P,V).
&sus{V} = price(P) :- selected(P), price(P,V).
:- &sus { price(P) : selected(P) } >= L,
pricelimit(L).

Expand Down

0 comments on commit 55d49e4

Please sign in to comment.