Skip to main content

ModelCenter Custom Optimization Algorithm SDK 2026 R1

ModelCenterEvaluator Class

Last update: 19.06.2026

Namespace: Phoenix.Optimization.AlgorithmTests.Evaluators

Overview

Abstract class that simplifies adding ModelCenter models as evaluators.

Inheritance

ModelCenterEvaluator

Declaration

class ModelCenterEvaluator

Description

Abstract class that simplifies adding ModelCenter models as evaluators.

Public Member Functions

Type Name Description
override ModelEvaluation EvaluateModel (object[] designVariables) Evaluates the model at the given design point
ModelEvaluation EvaluateModel (object[] designVariables) Evaluates the model at the given design point.
bool IsDesignAcceptable (object[] design, AreDesignsEqual areDesignsEqual) Determines whether design is an acceptable design.
void SetStartPoint (object[] startValues) Sets the starting design for the evaluator.

Public Member Functions inherited from ModelEvaluator

Type Name Description
void addConstraint (string name, double lowerBound, double upperBound) Method used to add a constraint
virtual void addConstraints () Method called to specifiy the constraints for the evaluator (by default, not constraints are specified)
void addDesignVariable (string name, object startValue) Method used to add design variable
void addDesignVariable (string name, object startValue, DataTable selectedAlphabet) Method used to add design variable
void addDesignVariable (string name, object startValue, double lowerBound, double upperBound) Method used to add design variable
void addDesignVariable (string name, object startValue, double lowerBound, double upperBound, DataTable selectedAlphabet) Method used to add a design variable
abstract void addDesignVariables () Method called to added design variables
void addObjective (string name, double solveForValue) Method used to add an objective (assumes solve for objective)
void addObjective (string name, double solveForValue, double weight) Method used to add an objective (assumes solve for objective)
void addObjective (string name, Goal goal) Method used to add an objective
void addObjective (string name, Goal goal, double weight, double solveForValue) Method used to add an objective
abstract void addObjectives () Method called to specifiy the objectives for the evaluator
void Dispose () Called to dispose the object.
abstract ModelEvaluation EvaluateModel (object[] designVariables) Evaluates the model at the given design point
virtual double getIGD (List< double[]> bestDesignObjectives, string filePath) Calculates the IGD value for multi-objective problem [The IGD formula is slightly modified to get the nearest possible value to actual IGD] [The actual formula accounts for equal no of optimal & obtained set of objectives, while, we calculate based on the number of objectives obtained]
abstract bool IsDesignAcceptable (object[] design, AreDesignsEqual areDesignsEqual) Determines whether design is an acceptable design.
void SetStartPoint (object[] startValues) Sets the starting design for the evaluator

Properties

Type Name Description
abstract string ModelFile [get] Property that containts the relative path to the assembiles location.
virtual bool RequiresAnalysisServer [get] Property which tells if the evaluator will requires Analysis Server to be launched.

Properties inherited from ModelEvaluator

Type Name Description
List< OptConstraint > Constraints [get] Method to get the list of constraints
int DesignVariableCount [get] Number of design variables specificed by the evaluator
List< DesignVariable > DesignVariables [get] Method to get the list of design variables
abstract object[,] GlobalBestDesigns [get] The global best design for the evaluator (a.k.a. "The right answers")
abstract bool HasFailedRuns [get] Does the evalutor have failed runs?
abstract bool HasNonSmoothResponses [get] Does the evaluator have non-smooth responses
abstract string Name [get] Name of the evaluator
int NumberOfObjectives [get] Number of objectives specified
List< Objective > Objectives [get] Method to get the list of objectives
abstract bool UsesConstraints [get] Does the evaluator use constraints?
abstract bool UsesDiscreteVariables [get] Does the evaluator use discrete variables?
abstract bool UsesMinMax [get] Does the evaluator use a Minimize/Maximize objective?
abstract bool UsesMultipleObjectives [get] Does the evaluator specify multiple objectives?
abstract bool UsesSolveFor [get] Does the evaluator use the solve for objective?

Properties inherited from IEvaluator

Type Name Description
List< OptConstraint > Constraints [get] List of constraints defined by the evaluator.
int DesignVariableCount [get] Number of design variables specificed by the evaluator.
List< DesignVariable > DesignVariables [get] List of design variables defined by the evaluator.
object[,] GlobalBestDesigns [get] The global best designs for the evaluator.
bool HasFailedRuns [get] Does the evalutor have failed runs?
bool HasNonSmoothResponses [get] Does the evaluator have non-smooth responses.
string Name [get] Name of the evaluator.
int NumberOfObjectives [get] Number of objectives specified.
List< Objective > Objectives [get] List of objectives defined by the evaluator.
bool UsesConstraints [get] Does the evaluator use constraints?
bool UsesDiscreteVariables [get] Does the evaluator use discrete variables?
bool UsesMinMax [get] Does the evaluator use a Minimize/Maximize objective?
bool UsesMultipleObjectives [get] Does the evaluator specify multiple objectives?
bool UsesSolveFor [get] Does the evaluator use the solve for objective?

Member Function Documentation

Dispose

override void Dispose ( bool disposing)

Closes and releases the ModelCenter instance if it has been created. Reimplemented from ModelEvaluator.

Parameters:

  • disposing - True if called by Dispose(), false otherwise.

EvaluateModel

override ModelEvaluation `EvaluateModel` ( object[] designVariables)

Evaluates the model at the given design point Requires a ModelCenter license. The first time that EvaluateModel is called, an instance of ModelCenter is created and the model specified in ModelFile is loaded.

Parameters:

  • designVariables - Values of the design variables in the order specified

Returns:

  • Model evaluation at the specified design point

Implements ModelEvaluator.

Property Documentation

ModelFile

abstract string ModelFile

Property that containts the relative path to the assembiles location.

RequiresAnalysisServer

virtual bool RequiresAnalysisServer

Property which tells if the evaluator will requires Analysis Server to be launched.

Connect with Ansys