Re: [eclipse-clp-users] Problem using probe_sched

From: Riyadh Jemal <riyadh_at_...191...>
Date: Wed, 14 Oct 2009 11:23:57 +0300
Hi Mark,

Actually the variable passed to probe_sched/5 is a list but after
discussing it with Kish, the problem found was to do with the way I had
created the list and some constraint using the variables in the list.

My problem was similar to that faced by Simone Pascucci on the mailing
list and it led me to suggest that some information including examples
on the use of dynamic clauses be included in the tutorial.

Regards
Riyadh

On Wed, 2009-10-14 at 09:56 +1100, Mark Wallace wrote:
> Hi Riyadh,
> > Greetings everyone,
> >
> > I am trying to write a scheduling application using probe_sched/5.
> >
> > When I assign the list of start time variables like:-
> >
> > Start_vars = [S1, S2, S3]
> >
> > within the predicate in which I call probe_sched the program runs fine.
> >
> > However when I try to dynamically create this list from user input like
> > below in the predicate in which I call probe_sched:-
> >
> > get_start_vars(User_input_list, Start_vars)
> >   
> I may be misunderstanding your problem, but the predicate probe_sched/5
> expects a list of variables, so you can't give it a single variable 
> which represents a list which is intended to be
> later constructed dynamically:
> 
> probe_sched(
>     + Starts,        
>     + Durations,
>     + Resources,
>     ++MaxResource,
>     ? CostFunction
>         )
> 
> Starts:       List of integers or ic variables (Task start times)
> Durations:    List of integers or ic variables (Task durations)
> Resources:    List of integers or ic variables (Task resource consumption)
> MaxResource:  Integer - maximum available resource
> CostFunction: Expression in terms of task start times and durations,
>               to be minimised.
> 
>     Cheers
>         Mark
> 
Received on Wed Oct 14 2009 - 08:28:45 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST