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

From: Kish Shen <kisshen_at_...5...>
Date: Fri, 02 Oct 2009 01:04:21 +0100
Riyadh Jemal wrote:
> I wanted to use eclipse to create a scheduling application and tried
> running the examples in the library documentation for the probe_sched/5.
> I get the following error:
> 
> "number expected in cplex_set_obj_coeff('EPLEX_OSI'(16'9146e48), 0, 1)"
> 
> I also get the same error in the program I wrote. Can anyone suggest the
> reason for this error.
> 
> Best Regards
> Riyadh
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
Hi Riyadh,

There are two probe_sched/5 -- one in lib(ic_probing_for_scheduling), 
the other in lib(probing_for_scheduling), which is the older version 
that uses the old lib(fd) rather than lib(ic). You did not say which one 
you are using -- you should use the ic version (ic_probing_for_scheduling).

I compiled the example in the documentation you get from
    help ic_probing_for_scheduling:probe_sched/5.
i.e. the following code (after loading lib(ic_probing_for_scheduling)):

probe_schedule(Starts,CostFun) :-
	Starts=[X,Y,Z],
         ic:(Starts::1..10),
         Durations=[10,5,5],
         Resources=[R1,R2,R3],
         ic:(R1::1..2), R2=2, R3=1,
         MaxResource=2,
         [OldX,OldY,OldZ]=[1,5,5],
         CostFun= abs(X-OldX)+abs(Y-OldY)+abs(Z-OldZ),
	probe_sched(Starts,Durations,Resources,MaxResource,CostFun).

and run this with the query probe_schedule(S,C), and this succeeded 
without returning an error.

Could you give more details on what you did to get your error? Without 
this, it is difficult to help you; the error looks strange -- from 
looking at the code for cplex_set_obj_coeff/3 (which is implemented in 
C, and is an internal predicate used by lib(eplex)), it should only 
return the number expected error if the third argument is not a number, 
but in your error message, the third argument does look like a number -- 1.

-- Kish Shen



-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Fri Oct 02 2009 - 01:23:10 CEST

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET