def get_gui(self): step_group1 = StepGroup(name='Enter your Data') step_group1.add_step( Step(name='Person speed', widgets=[SimpleGrid(Person)])) step_group1.add_step( Step( name='Training parameters', widgets=[{ "widget": ParameterForm(), "cols": 6 }], )) step_group2 = StepGroup(name='Solve') step_group2.add_step( Step(name='Learning using Reinforcement learning', widgets=[ExecuteLocalSolver()])) step_group3 = StepGroup(name='View the Solution') step_group3.add_step( Step(name='Result', widgets=[LearningChart(), SimpleGrid(FinalSolution)])) return [step_group1, step_group2, step_group3]
def get_gui(self): return [ StepGroup(name='Stores', steps=[Step(name='Stores', widgets=[SimpleGrid(Store)])]), StepGroup(name='Map', steps=[Step(name='Map', widgets=[MyKMLMap()])]) ]
def make_step_group(name, steps): """Make group where steps are an array of tuples with name, widgets.""" step_group = StepGroup(name=name) for step in steps: step_name, step_widgets = step step_group.add_step(Step(name=step_name, widgets=step_widgets)) return step_group
def get_gui(self): step_group1 = StepGroup(name='Enter your data') step_group1.add_step( Step(name='Enter your locations', widgets=[SimpleGrid(Location)])) step_group1.add_step( Step(name='Enter your paths', widgets=[SimpleGrid(Path)])) step_group2 = StepGroup(name='Solve') step_group2.add_step(Step(name='Solve', widgets=[ExecuteLocalSolver()])) step_group3 = StepGroup(name='View Results') step_group3.add_step( Step(name='View your Results', widgets=[MyKMLMap()])) return [step_group1, step_group2, step_group3]
def get_gui(self): return [ StepGroup(name='Input', steps=[ Step(name='URL', widgets=[ ParameterForm() ]), Step(name='Generate', widgets=[ TextWidget(text='Generate the histogram, this may take a little while'), CreateHistogram() ]) ]), StepGroup(name='Output', steps=[ Step(name='Histogram', widgets=[ ColorHistogram() ]) ]) ]
def get_gui(self): step_group_1 = StepGroup(name='Input') step_group_1.add_step( Step(name='Search Terms', widgets=[SimpleGrid(TweetSearchTerms)])) step_group_1.add_step( Step(name='Get Tweets', widgets=[ExecuteGetTweets()])) step_group_2 = StepGroup(name='Results') step_group_2.add_step( Step(name='Tweets', widgets=[SimpleGrid(Tweet, editable=False)])) step_group_3 = StepGroup(name='Visualisations') step_group_3.add_step( Step(name="Sentiment Distribution", widgets=[SentimentScatterChart()])) return [step_group_1, step_group_2, step_group_3]
def get_gui(self): step_group1 = StepGroup(name='Enter your data') step_group1.add_step( Step(name='Enter your locations', widgets=[SimpleGrid(Shop)], help_text="Enter the set of locations, with their associated \ demand, that need to be serviced by a facility")) step_group1.add_step( Step(name='Enter your candidate facilities', widgets=[SimpleGrid(Plant)], help_text="Enter the set of candidate facilities with their \ capacities and commissioning costs")) step_group1.add_step( Step(name='Review your data', widgets=[KMLMapInput()], help_text= "Review the locations and candidate facilities entered \ for correctness")) step_group2 = StepGroup(name='Solve') step_group2.add_step( Step(name='Solve Facility Location Optimisation \ Problem', widgets=[ExecuteSolverFunction()])) step_group3 = StepGroup(name='View the Solution') step_group3.add_step( Step( name='Download KML', widgets=[{ "widget": SimpleGrid(Flow), "cols": 6 }, { "widget": PlantSizePieChart(), "cols": 6 }, { "widget": KMLMapOutput(), "cols": 12 }], help_text="The grid below shows the amount of product flowing \ from facilities to locations. The map shows the same info \ geographically.")) return [step_group1, step_group2, step_group3]
def get_gui(self): step_options = StepGroup(name='Parameters') step_options.add_step(Step( name='Parameters', widgets=[ParameterForm()], help_text="Enter the parameters you want." )) step_group1 = StepGroup(name='Enter your data') step_group1.add_step(Step( name='Enter your people', widgets=[SimpleGrid(Person)], help_text="Enter the set of locations, of people who need food" )) step_group1.add_step(Step( name='Search for nearby food', widgets=[FindNearbyPlaces()], help_text="Search for nearby food joints that are open." )) step_group1.add_step(Step( name='Enter your locations', widgets=[SimpleGrid(Place)], help_text="Enter the set of places with their nutritional value." )) step_group1.add_step(Step( name='Review your data', widgets=[KMLMapInput()], help_text="Review the locations and places entered for correctness" )) step_group2 = StepGroup(name='Solve') step_group2.add_step(Step(name='Solve Food Optimisation Problem', widgets=[ ExecuteSolverFunction()])) step_group3 = StepGroup(name='View the Solution') step_group3.add_step(Step( name='Download KML', widgets=[ {"widget": SimpleGrid(Path, hidden_column_names=["uuid", "person_id", "place_id"]), "cols": 6} ], help_text="Enjoy your optimised lunch :)" )) return [step_options, step_group1, step_group2, step_group3]
def get_gui(self): step_group1 = StepGroup(name='Input') step_group1.add_step(Step( name='Commodities', widgets=[SimpleGrid(Commodity)], help_text="Enter the set of commodities" )) step_group1.add_step(Step( name='Nodes', widgets=[ SimpleGrid(Node), MapNodeInput(), ], help_text="Enter the set of Nodes" )) step_group1.add_step(Step( name='Arcs', widgets=[ SimpleGrid(Arc), MapArcInput() ], help_text="Enter the set of Arcs" )) step_group1.add_step(Step( name='Costs', widgets=[SimpleGrid(Cost)], help_text="Enter the costs associated with each Arc" )) step_group1.add_step(Step( name='Inflows', widgets=[SimpleGrid(Inflow)], help_text="Enter the set of inflow requirements for each Node" )) step_group2 = StepGroup(name='Engine') step_group2.add_step(Step(name='Solve Network Flow Problem', widgets=[ExecuteSolverFunction()])) step_group3 = StepGroup(name='Output') step_group3.add_step(Step( name='Flows', widgets=[SimpleGrid(NetworkFlow)], help_text="Optimal Flows" )) step_group3 = StepGroup(name='Output') step_group3.add_step(Step( name='Flows', widgets=[ {'widget': NetworkInflowChart(), 'cols': 6}, {'widget': NetworkOutflowChart(), 'cols': 6}, {'widget': MapFlowOutput(), 'cols': 12}, {'widget': SimpleGrid(NetworkFlow), 'cols': 12}, ], help_text="The grid below shows the optimal Requests selected." )) return [step_group1, step_group2, step_group3]
def generate_ui_step_group(name, steps): step_group = StepGroup(name=name) for step in steps: # each step should be a tuple with the name and an array of widgets step_group.add_step(Step(name=step[0], widgets=step[1])) return step_group