Re: [eclipse-users] Use of max with ic_probing_for_scheduling

From: David Norman <dn4096_at_...32...>
Date: Fri, 13 Jul 2007 12:08:09 -0500
Sorry about that.  The ex3 example does work.  
 
I was trying to rewrite ex3 to use probe_cstr_sched, but it looks like max can't be used directly with probe_cstr_sched.  Instead you have to write the max using linear constraints.
Is this correct?David 



> Date: Fri, 13 Jul 2007 17:50:11 +0100> From: kisshen_at_...5...> To: dn4096_at_...32...> CC: eclipse-users@...2...> Subject: Re: [eclipse-users] Use of max with ic_probing_for_scheduling> > Hi David,> > The problem is not with the max cost function. In the ex3 you are > trying, you need to specify the MaxResource, the error message you are > getting shows that the code expects this to be instantiated:> > >instantiation fault in =<(1, MaxResource) in module ic_make_overlap_bivs> > I think MaxResource is the maximum number of resources that can be used > at the same time, and this needs to be specified, as stated in the > documentation:> > probe_sched(+Starts, +Durations, +Resources, ++MaxResource, ?CostFun)> > If you look at ex1 and ex2, you will see that this is instantiated to an > integer before probe_sched/5 is called.> > > For example, with MaxResources = 3:> > [eclipse 3]: ex3(S,3,C).> lists.eco loaded traceable 0 bytes in 0.01 seconds> Found a solution with cost 8> probes(7)> > S = [1, 3, 1, 4]> C = 8> > > Delayed goals:> eplex : integers([8])> Yes (0.02s cpu)> > > Cheers,> > Kish> > David Norman wrote:> > Hi,> > > > Can someone give me a working example of using max in a cost function > > using the ic_probing_for_scheduling library?> > > > The example ex3 in the documentation for the ic_probing_for_scheduling > > documentation doesn't work for me in version 5.10 #77. > > > > Thanks,> > David> > > > > > > > ex3(Starts,MaxResource,Cost) :-> > Starts=[S1,S2,S3,S4],> > ic:(S1::1..10),> > ic:(S2::3..10),> > ic:(S3::1..5),> > ic:(S4::3..10),> > [D1,D2,D3,D4]=[5,5,3,3],> > Durations=[D1,D2,D3,D4],> > Resources=[1,1,1,1],> > CostFun= max([S1+D1,S2+D2,S3+D3,S4+D4]),> > probe_sched(Starts,Durations,Resources,MaxResource,CostFun),> > ic:(Cost =:= eval(CostFun)).> > > >> > % eclipse -b ProbingForScheduling.ecl -e 'ex3(Starts, MaxResource, Cost)'> > loading OSI clpcbc ... done> > instantiation fault in =<(1, MaxResource) in module ic_make_overlap_bivs> > abort> > > > > >> > ------------------------------------------------------------------------> > Don't get caught with egg on your face. Play Chicktionary! > > <http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink>> > ------------------------------------------------------------------------> >> > _______________________________________________> > ECLiPSe-Users mailing list> > ECLiPSe-Users@...2...> > http://www.crosscoreop.com/mailman/options/eclipse-users> > 
_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best web mail—award-winning Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HMWL_mini_pcmag_0707
Received on Fri Jul 13 2007 - 18:08:19 CEST

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