[Fwd: [Cops] How to stop ALPS searching as soon as a solution found]

Khoa Vo khoa.vo at informatik.uni-heidelberg.de
Tue Dec 4 12:56:57 EST 2007


Hi Yan,

I meant how I can trigger the "timeLimit" event after the fist solution
is found in my situation. Is there anyway to trigger this event in
function BwTreeNode::process(bool isRoot, bool rampUp), where class
BwTreeNode inherited from class AlpsTreeNode. Of course this is only a
trick to stop, while waiting for you enhancement.

Thanks,
Khoa

-----Original Message-----
From: Yan Xu [mailto:Yan.Xu at sas.com] 
Sent: Tuesday, December 04, 2007 6:48 PM
To: Khoa Vo
Cc: cops at list.coin-or.org
Subject: RE: [Fwd: [Cops] How to stop ALPS searching as soon as a
solution found]

Khoa,

you can use the timeLimit or nodeLimit in two ways. Say you want to stop
search after 600 seconds.


1) ./yourExecutable -Alps_instance yourInstance -Alps_timeLimit 600


2) First, set Alps_timeLimit in yourParameter.par file

./yourExecutable -par yourParameter.par


Alps/examples/Knap/knap.par is an example parameter file.


Basically, you can set every parameter in command line or parameter
file.


Best,
Yann





-----Original Message-----
From: Khoa Vo [mailto:khoa.vo at informatik.uni-heidelberg.de]
Sent: Tuesday, December 04, 2007 12:00 PM
To: Yan Xu
Cc: cops at list.coin-or.org
Subject: RE: [Fwd: [Cops] How to stop ALPS searching as soon as a
solution found]

Hi Yan,

I appreciate your quick response. Please let me know when "solLimit" is
done. I think the first improvement with checking solution limit after
rampup is fine, as usually instances for parallel computing are large
and takes long.

With the two current parameters: "timeLimit" and "nodeLimit", can I use
one of them as a "trick" to stop the search? How to trigger these
events? Of course we know that the exit status message of "timing or
node limit" is not right.

Thanks,
Khoa

-----Original Message-----
From: Yan Xu [mailto:Yan.Xu at sas.com]
Sent: Tuesday, December 04, 2007 5:39 PM
To: cops at list.coin-or.org
Cc: khoa.vo at informatik.uni-heidelberg.de
Subject: RE: [Fwd: [Cops] How to stop ALPS searching as soon as a
solution found]

There is a parameter "solLimit" in AlpsParams.h that should be used to
stop searching when reacing solution limit. However, it hasn't been
fully implemented in ALPS yet.

For sequential code, I can make it work soon.

For parallel code, it need a bit work since we need make sure we clean
up everything on every processes before leave. But, I can first make the
option works after rampup. So during rampup, if the search finds a
solution, it won't exit, but once the rampup complete, the search check
whether it reachs solution limit. If yes, the search exit. If you are
using "spiral initialization", rampup phase generally completes quickly.

By the way, there are other two parameters "timeLimit" and "nodeLimit",
which works in serial and parallel (after rampup phase).

I will let you know when I'm done.

Best,
Yan




-------- Original Message --------
Subject:        [Cops] How to stop ALPS searching as soon as a solution
found
Date:   Tue, 4 Dec 2007 13:27:37 +0100
From:   Khoa Vo <khoa.vo at informatik.uni-heidelberg.de>
To:     <cops at list.coin-or.org>



Dear all,



I am using ALPS framework (version 0.95) in COPS family to parallelize
my computing program for a discrete optimization problem (Matrix
Bandwidth optimization). It looks to be a well architected and robust
framework.



Due to the difficulty of Bandwidth problem, in the current program I
test for each of input bandwidth value if there is any feasible solution
for that. If yes, then it is the necessary solution and searching should
be stopped. Otherwise searching continues until the full tree has been
tested and an answer of Infeasibility will be returned. In other words,
I want the search to stop when a solution found, not until all nodes
have been pruned, both sequentially and parallelly.



Can you tell me how to configure/program such a message/event? In the
current program, in function BwTreeNode::process(bool isRoot, bool
rampUp), where class BwTreeNode inherited from class AlpsTreeNode, when
a solution found I try to using

-sending a message with ALPS_S_FINAL_SOL

-getKnowledgeBroker()->setExitStatus(AlpsExitStatusOptimal);

But that didn't help, the search keeps running until all nodes have been
pruned.



Any hint, advice or solution will be welcomed.

Thanks,

Khoa Vo

Institute of Computer Science

University of Heidelberg

Im Neuenheimer Feld 368

69120 Heidelberg

Germany

Email: khoa.vo at informatik.uni-heidelberg.de
<mailto:khoa.vo at informatik.uni-heidelberg.de>

Phone: 49-6221-545743


--
Dr. Ted Ralphs
Associate Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
ted at lehigh dot edu
www.lehigh.edu/~tkr2





More information about the Cops mailing list