.. _objfunc-py: ########## objfunc.py ########## SIMO optimization objective, subobjective and utility function definitions. ******************************** class ObjectiveFunction(object): ******************************** Optimization task objective function definition. def __init__(self, ftype, target, scope): ========================================= >>> from simo.builder.optimization.objfunc import ObjectiveFunction >>> obf = ObjectiveFunction("additive", "max", "global") >>> obf.type 'additive' >>> obf.target 'max' >>> obf.scope 'global' *************************** class SubObjective(object): *************************** Optimization task subobjective definition. def __init__(self, weight, expr, ufunc, optlevel=None): ======================================================= >>> from simo.builder.optimization.objfunc import SubObjective >>> sob = SubObjective(1.0, "EXPR", "UFUNC", 0.0) >>> sob.weight 1.0 >>> sob.expr 'EXPR' >>> sob.ufunc 'UFUNC' >>> sob.optlevel 0.0 ******************** class UFunc(object): ******************** Subobjective utility function. def __init__(self, ftype, x, y): ================================= >>> from simo.builder.optimization.objfunc import UFunc >>> ufu = UFunc("linear", 1, 2) >>> ufu.type 'linear' >>> ufu.midpoint True >>> ufu.coords (1, 2)