Esempio n. 1
0
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(CantileverBeam(ndim=3*ndim), np.arange(1, 3*ndim, 3), w=w)

        self.options = OptionsDictionary()
        self.options.declare('ndim', ndim, types=int)
        self.options.declare('return_complex', False, types=bool)
        self.options.declare('name', 'NdimCantileverBeam', types=str)

        self.xlimits = self.problem.xlimits
Esempio n. 2
0
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(Rosenbrock(ndim=ndim + 1),
                                      np.arange(1, ndim + 1),
                                      w=w)

        self.options = OptionsDictionary()
        self.options.declare("ndim", ndim, types=int)
        self.options.declare("return_complex", False, types=bool)
        self.options.declare("name", "NdimRosenbrock", types=str)

        self.xlimits = self.problem.xlimits
Esempio n. 3
0
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(RobotArm(ndim=2 * (ndim + 1)),
                                      np.arange(3, 2 * (ndim + 1), 2),
                                      w=w)

        self.options = OptionsDictionary()
        self.options.declare('ndim', ndim, types=int)
        self.options.declare('return_complex', False, types=bool)
        self.options.declare('name', 'NdimRobotArm', types=str)

        self.xlimits = self.problem.xlimits
Esempio n. 4
0
class NdimCantileverBeam(Problem):
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(CantileverBeam(ndim=3 * ndim),
                                      np.arange(1, 3 * ndim, 3),
                                      w=w)

        self.options = OptionsDictionary()
        self.options.declare("ndim", ndim, types=int)
        self.options.declare("return_complex", False, types=bool)
        self.options.declare("name", "NdimCantileverBeam", types=str)

        self.xlimits = self.problem.xlimits

    def _evaluate(self, x, kx):
        return self.problem._evaluate(x, kx)
Esempio n. 5
0
class NdimRobotArm(Problem):
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(RobotArm(ndim=2 * (ndim + 1)),
                                      np.arange(3, 2 * (ndim + 1), 2),
                                      w=w)

        self.options = OptionsDictionary()
        self.options.declare("ndim", ndim, types=int)
        self.options.declare("return_complex", False, types=bool)
        self.options.declare("name", "NdimRobotArm", types=str)

        self.xlimits = self.problem.xlimits

    def _evaluate(self, x, kx):
        return self.problem._evaluate(x, kx)
Esempio n. 6
0
class NdimRosenbrock(Problem):
    def __init__(self, ndim=1, w=0.2):
        self.problem = ReducedProblem(Rosenbrock(ndim=ndim + 1),
                                      np.arange(1, ndim + 1),
                                      w=w)

        self.options = OptionsDictionary()
        self.options.declare('ndim', ndim, types=int)
        self.options.declare('return_complex', False, types=bool)
        self.options.declare('name', 'NdimRosenbrock', types=str)

        self.xlimits = self.problem.xlimits

    def _evaluate(self, x, kx):
        return self.problem._evaluate(x, kx)