I have a file that contains a List of what “Algo” I should run
Then Julia should read it and Create an instance of the correct “Algo” object:
abstract type OptimizationAlgo end struct Linear <: OptimizationAlgo end struct Quad <: OptimizationAlgo end struct ThirdOrder <: OptimizationAlgo end algo_str = readline() # Let's say I type in "Linear" # Convert algo_str to the correct algo struct # How to do it??
But how to efficiently do so?
The only way I could think of:
Is there a way Without Using any Macro?