actual solving, minus constraints for non tcc/tif constraints
This commit is contained in:
@ -2,8 +2,8 @@ from pydantic import BaseModel
|
||||
from typing import List, Optional, Dict
|
||||
|
||||
class AdvancedOptions(BaseModel):
|
||||
linearity_check: bool
|
||||
show_progress: bool
|
||||
linearity_check: Optional[bool]
|
||||
show_progress: Optional[bool]
|
||||
max_solution_time: Optional[int]
|
||||
brand_bound_tolerance: Optional[float]
|
||||
max_forms: Optional[int]
|
||||
|
@ -3,9 +3,16 @@ from typing import List
|
||||
|
||||
from models.attribute import Attribute
|
||||
|
||||
from lib.irt.item_response_function import ItemResponseFunction
|
||||
from lib.irt.item_information_function import ItemInformationFunction
|
||||
|
||||
class Item(BaseModel):
|
||||
id: int
|
||||
attributes: List[Attribute]
|
||||
b_param: int
|
||||
irf: float = 0.00
|
||||
iif: float = 0.00
|
||||
b_param: float = 0.00
|
||||
|
||||
def iif(self, solver_run, theta):
|
||||
return ItemInformationFunction(solver_run.irt_model).calculate(b_param=self.b_param,theta=theta)
|
||||
|
||||
def irf(self, solver_run, theta):
|
||||
return ItemResponseFunction(solver_run.irt_model).calculate(b_param=self.b_param,theta=theta)
|
||||
|
@ -13,6 +13,7 @@ class SolverRun(BaseModel):
|
||||
irt_model: IRTModel
|
||||
objective_function: ObjectiveFunction
|
||||
total_form_items: int
|
||||
total_forms: int
|
||||
theta_cut_score: float = 0.00
|
||||
advanced_options: Optional[AdvancedOptions]
|
||||
engine: str
|
||||
|
Reference in New Issue
Block a user