Re: [eclipse-clp-users] Data Passing from C++ to Eclipse

From: Vivek Balaraman <vivek.balaraman_at_...6...>
Date: Tue, 10 Jun 2008 11:13:03 +0530
Joachim,
Thanks for the information.

My response to the last part of your mail


On 6/9/08, Joachim Schimpf (Independent Contractor) <jschimpf_at_...5...>
wrote:

>
> How are you going to compute several solutions?  Are they computed one
> by one from scratch, or all in one go, or are alternative solutions
> produced on backtracking, etc?



Our current code in eclipse calculates a solution, stores it in a store and
then calls fail causing it to backtrack and find other solutions. Then
either when all solutions or number of solutions > 50 used to send the
solutions to the calling program one by one using the write_exdr operations.

something like

calc_all_scenarios:-

 (

 calc_one_scenario ([Index, Solution]),

 store_put(Store, Index,Solution),

 Additionally also increment the count of solutions in a counter

 fail

 ;

 Lookup counter to get number of solutions

For all solutions, store_get(Store,I, Solution), write solution to queue

).

Thanks

Vivek Balaraman
Received on Mon Jun 09 2008 - 22:43:07 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST