diff --git a/src/components/DistBuilder.re b/src/components/DistBuilder.re index 70dde01d..c2a01b86 100644 --- a/src/components/DistBuilder.re +++ b/src/components/DistBuilder.re @@ -165,7 +165,7 @@ let make = () => { ~onSubmit=({state}) => {None}, ~initialState={ guesstimatorString: "mm(5 to 20, floor(normal(20,2)), [.5, .5])", - domainType: "LeftLimited", + domainType: "Complete", xPoint: 50.0, xPoint2: 60.0, excludingProbabilityMass2: 0.5, diff --git a/src/interface/FormBuilder.re b/src/interface/FormBuilder.re index aa6db47c..35f61608 100644 --- a/src/interface/FormBuilder.re +++ b/src/interface/FormBuilder.re @@ -21,30 +21,28 @@ let propValue = (t: Prop.Value.t) => { let newDistribution = DistPlusIngredients.toDistPlus( ~sampleCount=2000, - ~outputXYPoints=2000, - ~truncateTo=Some(100), + ~outputXYPoints=1000, + ~truncateTo=Some(500), r, ); switch (newDistribution) { | Some(distribution) => -
- - - -
- {"30 to infinity, 80% mass" |> ReasonReact.string} -
-
+
+ // + // + //
+ // {"30 to infinity, 80% mass" |> ReasonReact.string} + //
| None => "Something went wrong" |> ReasonReact.string }; | FloatCdf(_) =>
diff --git a/src/interface/Prop.re b/src/interface/Prop.re index cd7a78a2..95a27f38 100644 --- a/src/interface/Prop.re +++ b/src/interface/Prop.re @@ -236,6 +236,23 @@ module TypeWithMetadata = { ~assumptionType=PRIMARY_INPUT, (), ); + + let sex = + make( + ~id="sex", + ~name="Sex", + ~description=None, + ~type_= + SelectSingle({ + options: [ + {id: "male", name: "Male"}, + {id: "female", name: "Female"}, + ], + default: Some("female"), + }), + ~assumptionType=PRIMARY_INPUT, + (), + ); }; module Model = { diff --git a/src/models/Human.re b/src/models/Human.re index 706618a0..7b9bb846 100644 --- a/src/models/Human.re +++ b/src/models/Human.re @@ -21,7 +21,8 @@ module Interface = { let run = (p: array(option(Prop.Value.t))) => { switch (p) { - | [|Some(FloatPoint(age))|] => Some(Model.make(age)) + | [|Some(FloatPoint(age)), Some(SelectSingle(sex))|] => + Some(Model.make(age)) | _ => None }; }; @@ -34,7 +35,7 @@ module Interface = { description: "When will you die?", version: "1.0.0", author: "Ozzie Gooen", - inputTypes: [|TypeWithMetadata.age|], + inputTypes: [|TypeWithMetadata.age, TypeWithMetadata.sex|], outputTypes: [||], run, };