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

From: Mark Wallace <Mark.Wallace_at_infotech.monash.edu.au>
Date: Wed, 14 Oct 2009 09:56:56 +1100
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

-- 
Professor Mark Wallace
Faculty of Information Technology
Monash University, Caulfield 
Vic 3145, Australia
Room 6.43, Building H
Tel: +61 (0)3 9903 4276
Received on Tue Oct 13 2009 - 22:57:04 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET