Search in sources :

Example 1 with NaiveNoGoodStore

use of at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore in project Alpha by alpha-asp.

the class AlphaHeuristicTestAssumptions method setUp.

@BeforeEach
public void setUp() {
    String testProgram = "" + "b1." + "b2." + "{b3}." + "{b4}." + "h :- b1, b2, not b3, not b4.";
    CompiledProgram internalProgram = parseAndPreprocess.apply(testProgram);
    atomStore = new AtomStoreImpl();
    grounder = new NaiveGrounder(internalProgram, atomStore, true);
    assignment = new TrailAssignment(atomStore);
    choiceManager = new TestableChoiceManager(assignment, new NaiveNoGoodStore(assignment));
}
Also used : TestableChoiceManager(at.ac.tuwien.kr.alpha.core.solver.TestableChoiceManager) NaiveGrounder(at.ac.tuwien.kr.alpha.core.grounder.NaiveGrounder) NaiveNoGoodStore(at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore) AtomStoreImpl(at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl) CompiledProgram(at.ac.tuwien.kr.alpha.core.programs.CompiledProgram) TrailAssignment(at.ac.tuwien.kr.alpha.core.solver.TrailAssignment) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with NaiveNoGoodStore

use of at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore in project Alpha by alpha-asp.

the class BerkMinTest method setUp.

@BeforeEach
public void setUp() {
    AtomStore atomStore = new AtomStoreImpl();
    TestUtils.fillAtomStore(atomStore, 2);
    WritableAssignment assignment = new TrailAssignment(atomStore);
    assignment.growForMaxAtomId();
    this.berkmin = new BerkMin(assignment, new PseudoChoiceManager(assignment, new NaiveNoGoodStore(assignment)), new Random());
}
Also used : AtomStore(at.ac.tuwien.kr.alpha.core.common.AtomStore) Random(java.util.Random) NaiveNoGoodStore(at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore) AtomStoreImpl(at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl) WritableAssignment(at.ac.tuwien.kr.alpha.core.solver.WritableAssignment) TrailAssignment(at.ac.tuwien.kr.alpha.core.solver.TrailAssignment) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AtomStoreImpl (at.ac.tuwien.kr.alpha.core.common.AtomStoreImpl)2 NaiveNoGoodStore (at.ac.tuwien.kr.alpha.core.solver.NaiveNoGoodStore)2 TrailAssignment (at.ac.tuwien.kr.alpha.core.solver.TrailAssignment)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 AtomStore (at.ac.tuwien.kr.alpha.core.common.AtomStore)1 NaiveGrounder (at.ac.tuwien.kr.alpha.core.grounder.NaiveGrounder)1 CompiledProgram (at.ac.tuwien.kr.alpha.core.programs.CompiledProgram)1 TestableChoiceManager (at.ac.tuwien.kr.alpha.core.solver.TestableChoiceManager)1 WritableAssignment (at.ac.tuwien.kr.alpha.core.solver.WritableAssignment)1 Random (java.util.Random)1