Documentation
¶
Index ¶
- Constants
- Variables
- type CustomIdentifiers
- type Experiment
- type ExperimentID
- type ExperimentIdentifier
- type ExperimentInput
- type ExperimentIntegrationFunction
- type ExperimentIntegrationFunctions
- type ExperimentRepository
- type ExperimentSolution
- type ExperimentSolutions
- type IntegrationResult
- type IntegrationResults
- type Scheduler
- type Service
- type Solution
- type SolutionID
- type SolutionInput
- type SolutionRepository
Constants ¶
View Source
const ( DEFAULT_TOLERANCE = 1e-10 DEFAULT_MAX_ITERATIONS = uint(1000000) )
Variables ¶
View Source
var ErrUnknown = errors.New("unknown solution")
ErrUnknown is used when a solution could not be found.
View Source
var WORKDIR = "/tmp/sls/solutions"
Functions ¶
This section is empty.
Types ¶
type CustomIdentifiers ¶
type CustomIdentifiers map[string]interface{}
type Experiment ¶
type Experiment struct {
ID ExperimentID
ExternalKey *string
Source string
MaxIterations uint
Tolerance float64
Identifier ExperimentIdentifier
IntegrationFunctions ExperimentIntegrationFunctions
SolutionsScheduledAt *time.Time
Solutions *ExperimentSolutions
CreatedAt time.Time
}
type ExperimentID ¶
type ExperimentID string
func NextExperimentID ¶
func NextExperimentID() ExperimentID
type ExperimentIdentifier ¶
type ExperimentInput ¶
type ExperimentInput struct {
ExternalKey *string
MaxIterations *uint
Tolerance *float64
Source string
Identifier ExperimentIdentifier
}
type ExperimentIntegrationFunctions ¶
type ExperimentIntegrationFunctions []ExperimentIntegrationFunction
type ExperimentRepository ¶
type ExperimentRepository interface {
Store(experiment *Experiment) error
Find(id ExperimentID, externalKey *string) (*Experiment, error)
}
type ExperimentSolution ¶
type ExperimentSolution struct {
ID SolutionID
IdentifierValue float64
Solution *Solution `bson:"-"`
}
type ExperimentSolutions ¶
type ExperimentSolutions []*ExperimentSolution
type IntegrationResult ¶
type IntegrationResults ¶
type IntegrationResults []IntegrationResult
type Scheduler ¶
type Scheduler interface {
ScheduleSolution(*Solution) error
ScheduleExperiment(*Experiment) error
}
type Service ¶
type Service interface {
ScheduleSolution(si *SolutionInput) (*Solution, error)
Solve(id SolutionID) error
FindSolution(id SolutionID, externalKey *string) (*Solution, error)
ScheduleExperiment(ei *ExperimentInput) (*Experiment, error)
ProcessExperiment(id ExperimentID) error
FindExperiment(id ExperimentID, externalKey *string) (*Experiment, error)
}
func NewService ¶
func NewService(solutions SolutionRepository, experiments ExperimentRepository, scheduler Scheduler, compiler compiler.Service) Service
type Solution ¶
type Solution struct {
ID SolutionID
ExternalKey *string
Source string
ModelHash string
CustomIdentifiers CustomIdentifiers
MaxIterations uint
Tolerance float64
Errored *bool
Found *bool
Steps *uint64
ExecutionTime *float64
Results *IntegrationResults
CreatedAt time.Time
UpdatedAt time.Time
FinishedAt *time.Time
}
type SolutionInput ¶
type SolutionInput struct {
ExternalKey *string
MaxIterations *uint
Tolerance *float64
Source string
CustomIdentifiers CustomIdentifiers
}
Click to show internal directories.
Click to hide internal directories.