[gecode-users] question on using Script and Option to run solver

Changbin Liu changbin.liu at gmail.com
Tue Apr 12 00:24:44 CEST 2011


Many thanks~~~ It works!

On Fri, Apr 8, 2011 at 1:23 AM, Mikael Zayenz Lagerkvist
<zayenz at gmail.com>wrote:

> The easiest way if you want to use the Script support, is to subclass the
> Options class with your particular data included. See the examples for
> details (e.g., car-sequencing.cpp) and Chapter 11 of Modeling and
> Programming with Gecode..
>
> Cheers,
> Mikael
>
> 2011/4/8 Changbin Liu <changbin.liu at gmail.com>
>
>> Hi, Folks
>>
>>    I am trying to run Gecode solver using code like:
>>
>> *Script::run<SendMostMoney,BAB,Options>(opt);*
>>
>> This is from one example in the documentation. In this code, it is assumed
>> that solver SendMoreMoney is constructed based on the only parameter Option
>> "opt".
>>
>> Here come the problem: what if my customized solver needs more parameters
>> for constructor beside Option "opt"?  How should I modify above code to run
>> the solver?
>>
>> Many thanks
>>
>> --
>> --------------------------------------------
>> Changbin Liu
>> Computer & Information Science Department
>> University of Pennsylvania
>> Philadelphia, PA
>> U.S.
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>
>>
>
>
> --
> Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
>



-- 
--------------------------------------------
Changbin Liu
Computer & Information Science Department
University of Pennsylvania
Philadelphia, PA
U.S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110411/29be217e/attachment.htm>


More information about the users mailing list