Questions tagged [eclipse-clp]

ECLiPSe is a constraint logic programming system that works with Prolog as a basic engine. It includes modules for integer constraint logic programming as well as floating points. It also supports a large number of global constraints.

Books

A free downloadable pdf

A Gentle Guide to Constraint Logic Programming via ECLiPSe

83 questions
2
votes
2 answers

Whats wrong with this prolog optimization solution?

solve(Amounts) :- Total = 1505, Prices = [215, 275, 335, 355, 420, 580], length(Prices, N), length(Amounts, N), Amounts :: 0..Total//min(Prices), Amounts * Prices #= Total, labeling(Amounts).
AAAA
  • 23
  • 2
2
votes
3 answers

Constraint Programming toolset with most active community & resources

I'm new to CP. So far I've played with MiniZinc and I'm finding this a lot of fun. Before I commit too much, I want to figure out what CP language & solver is best to start with in terms of most active community, actively being developed and used…
Mike
  • 251
  • 1
  • 12
2
votes
1 answer

How can I freely assert/retract facts with modules in ECLiPSe Prolog?

I am trying to run the following test case: test :- assertz(abc : uvw(1)). The above works in SWI-Prolog. But I am having problems in making it work in ECLiPSe Prolog. I am getting the following error: trying to redefine an existing imported…
user502187
1
vote
1 answer

ECLiPSe Integration with VSCode

I have just spent a three hours trying to configure my working environment for VSCode and ECLiPSe (I am new to VSCode and rusty in ECLiPSe) in Windows. So far I have created a task (and a keyboard shortcut) in VSCode to launch TkEclipse (the…
Echancrure
  • 63
  • 1
  • 8
1
vote
1 answer

What is the uncontrollable automatic propagation behavior in ECLIPSe-CLP?

I am trying to research, evaluate, and compare some searching methods in ECLIPSe-CLP. The key method of evaluating complexity and the efficacy of a method in said system is counting backtracks, implemented with the predicate search/6 from…
Hugo Ye
  • 21
  • 3
1
vote
1 answer

prolog max_min_eval/2 solution issue

I want to create a predicate max_min_eval/2 or max_min_eval(List,Result) which read a list like this [1,min,2,max,4,max,3] -> (((1 min 2) max 4) max 3) in eclipse prolog and put the Result into a varialble. How can I do this? This is my code: %%…
1
vote
2 answers

How to read large Prolog files in ECLiPSe?

I generated a large file of paths via eclipse. Each line contains a clause for a list of 27 points. $ wc -l snake_points.pl 240917 snake_points.pl $ ls -lh snake_points.pl -rw-rw-r-- 1 carl carl 72M Sep 6 02:39 snake_points.pl $ head -n 1…
Carl
  • 13
  • 5
1
vote
1 answer

ECLiPSe CLP - TSP with Time WIndow. How do i calculate the cost?

I'm working on a variant of a TSP, where each node has a Time Window, but i've some problems calculating the cost function. I'm using a succesors model, so i have a list where each variable rapresents the next destination, Xi = j is the link from…
1
vote
1 answer

Age comparsion for Zebra Riddle

I'm trying to solve a logic riddle similar to the Einstein riddle with ECLiPSe Prolog via CLP: A band has 6 jazz-musicians, no one is younger than 70 years old. Every artist has written a different song. The used instruments are: a piano at…
Patrick
  • 168
  • 8
1
vote
1 answer

Is there a good source for finding common problems with ECLiPSe?

As a new ECLiPSe user I am running into problems. I was able to consult a .pl file, but when I changed the extension to .ecl I got a file-does-not-exist message. I was even able to run the .pl file, but couldn't access any of the subsidiary…
RussAbbott
  • 2,660
  • 4
  • 24
  • 37
1
vote
0 answers

Pruning symmetrical solutions in ECLiPSe Prolog with the use of constraints

This is a subproblem of a constraint satisfaction problem I'm currently working on and thus, I've omitted extra constraints that I apply to my variables. Suppose we have a list of 5 variables and said vars can take values from 1 to 3. Symmetry is…
1
vote
1 answer

Two objective functions

If we have two objective functions in Eclipse CLP that Cost1 is more important than Cost2, is the following true? minimize(minimize(labeling(Vars), Cost1), Costs2).
OmG
  • 18,337
  • 10
  • 57
  • 90
1
vote
2 answers

How integer suspension will be handled when it is used in head of a condition

I have the following conditions over two variable A and B: [A,B] #:: 1..10, (A #= 3) or (B #= 3), ((A #> 3 or B #>3) -> % expression 1 ; % expression 2 ) %cntd The problem is in line 2, the solver doesn't know about the value of A and B,…
OmG
  • 18,337
  • 10
  • 57
  • 90
1
vote
1 answer

Eclipse CLP: maximum number of constraints/variables

In the Eclipse CLP, how many constraints or variables can I define? I am currently remodeling my scheduling problem - I need to replace a single alldifferent constraint with many atmost constraints. But since I've introduced this change, my ecl…
Jan Drozen
  • 894
  • 2
  • 12
  • 28
1
vote
0 answers

A General Method To Transpile A Code in Eclipse CLP to CHR

My question is a little general but the answer to my specific question could be very helpful. The general question is "Is there any general method to transfer code in Eclipse CLP prolog to a Constraint Handling Rules (CHR) code?". I know that the…
OmG
  • 18,337
  • 10
  • 57
  • 90