Commit c4373fa0 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

solver: Add abstract solver class.

Showing with 40 additions and 0 deletions
+40 -0
# -*- coding: utf-8 -*-
import os
import subprocess
from enum import Enum
class STATUS(Enum):
STOPED = 0
RUNNING = 1
FAILED = 2
CONF_ERROR = 3
class AbstractSolver(object):
def __init__(self, name):
super(AbstractSolver, self).__init__()
self.name = name
self.status = STATUS.STOPED
def nb_proc(self):
"""
Return the number of processor used by solver (usefull for
multiple solver run on same time).
"""
return 1
def status(self):
return self.status
def set_status(self, status):
self.status = status
def run(self):
return False
def kill(self):
return False
def readline(self):
return ""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment