Skip to content
Snippets Groups Projects
Commit 1958d786 authored by Jean-Christophe Routier's avatar Jean-Christophe Routier
Browse files

dalek example

parent 7ed5b68d
Branches
No related tags found
No related merge requests found
......@@ -79,6 +79,6 @@ object DalekSurveillanceSystem{
val pb = new DCOP(Set(d1, d2, d3, d4, d5), Set(constraint12, constraint13, constraint14, constraint23, constraint25,
constraint34, constraint35, constraint45))
val assignment : Context = new Context().fix(
val initialContext : Context = new Context().fix(
Map(d1-> north, d2 -> north, d3 -> north, d4 -> north, d5 -> north))
}
......@@ -9,8 +9,8 @@ import akka.actor.ActorSystem
* Main application to test ScaDCOP on a toy example
*/
object Main extends App {
import org.scadcop.example.RobeColouringExample._
//or import org.scadcop.example.DalekSurveillanceSystem._
//import org.scadcop.example.RobeColouringExample._
import org.scadcop.example.DalekSurveillanceSystem._
//or import org.scadcop.example.ToyExample._
val system = ActorSystem("TestDistributedSolver")
......
......@@ -15,8 +15,8 @@ class ObjectiveDalekSurveillanceSystemSpec extends AnyFlatSpec {
"The objective when all the directions are north" should " be 33.0" in {
println(pb)
println(assignment)
assert(pb.objective(assignment) ~= 33.00)
println(initialContext)
assert(pb.objective(initialContext) ~= 33.00)
}
"The objective when all the directions are south" should " be 33.0" in {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment