PK NS)Lɡ 5 ACT Templates for DesignXplorer_R190/CppOptimizer.xmlANSYS, Inc.Example of External Optimizer used within DesignXplorer, written in Python and C++4C550BC5-235E-4AFA-9CD7-EC71BC5595D5onInitcreatePythonWrapperOptimizercanRunOptimizergetDescriptiongetConfigurationgetQuickHelpgetStatusgetConvergenceDescriptionrelease
PK NS)L$d 8 ACT Templates for DesignXplorer_R190/CSharpOptimizer.xmlANSYS, Inc.Examples of External Optimizers used within DesignXplorer, written in Python and C#7A4953B8-042E-437E-863A-AAE5C2E93F2DonInitcreateOptimizercanRunOptimizergetDescriptiongetConfigurationgetQuickHelpInputParametersEditedcreateOptimizercanRunOptimizergetDescription2getConfigurationgetQuickHelpInputParametersEdited
PK NS)LK>N_x x 7 ACT Templates for DesignXplorer_R190/CSharpSampling.xmlANSYS, Inc.Custom Random Filling DOE supporting 5 continuous input parameters36B8DE9A-8BD8-4A94-A7BB-94B39A3892E0onInitcreateSamplingcanRunSampling
PK NS)Lh:V0 0 8 ACT Templates for DesignXplorer_R190/PythonOptimizer.xmlANSYS, Inc.Example of External Optimizer used within DesignXplorer, entirely written in PythonDA72C28C-CA9C-4EB2-BCDA-B41E5C0C382AonInitonTerminatecreatePythonOptimizercanRunOptimizergetDescriptiongetConfigurationgetQuickHelpgetStatusgetConvergenceDescriptionObjectivesOrConstraintsEditedInputParametersEditedisVisibleForSOORefreshCustomPropertiesIsContinuousParameterWithPythonOptimizerIsPythonOptimizerIsSeekTargetbjectiveWithPythonOptimizerIsActiveObjectiveWithPythonOptimizerIsActiveConstraintWithPythonOptimizer
PK NS)L 4 4 7 ACT Templates for DesignXplorer_R190/PythonSampling.xmlANSYS, Inc.Full Factorial DOE supporting 10 continuous input parameters used within DesignXplorer, entirely written in PythonF4F4A543-F84E-4791-BD0D-754A7395AA95createSamplingcanRunSamplingInputParametersEditedisVisibleForSinglnput
PK NS)L<ƟT T / ACT Templates for DesignXplorer_R190/README.txt###############################################################################
#
# README.txt --
#
# $LastChangedDate$
# $LastChangedRevision$
# $LastChangedBy$
#
# Author: smarguer
#
# History:
# March 5, 2013 - initial revision
# July 25, 2016 - add sampling extensions
#
###############################################################################
OVERVIEW:
------------
The package ExtensionExamples contains several extension examples,
each one illustrating the implementation of either an optimization extension
or a sampling extension with different programming languages:
- PythonOptimizer and PythonSampling implemented entirely in IronPython,
- CSharpOptimizer and CSharpSampling implemented in C#,
- CppOptimizer implemented in C++.
For each extension, the package provides an xml file and an associated sub-
directory containing the source code. A README file describes the content
and gives instructions to build the extension.
INSTALLATION PROCEDURE:
----------------------------
1- Refer to the README file of the extension to install and follow the
building instructions.
2- Open a new ANSYS Workbench session (R15.0 or higher)
3- Select Tools > Options > Extensions. Add the path of your extension
directory (the ExtensionExamples directory containing all the xml
files) to "Additional Extension Folders".
4- Select Extensions > Manage Extensions. All the available extensions are
displayed in the Extensions Manager window.
5- To load (or unload) one or more extensions, select (or unselect) the
extensions and close the window.
6- a) For the optimization extensions:
Define your optimization problem as usual.
All optimization algorithms provided by the loaded extensions are listed
(along with built-in methods) in the "Method Name" drop down menu.
b) For the sampling extensions:
Define your design of experiments as usual.
All sampling algorithms provided by the loaded extensions are listed
(along with built-in methods) in the "Method Name" drop down menu.
###############################################################################
PK NS)Lnֳ J ACT Templates for DesignXplorer_R190/CppOptimizer/CppExtensionCallbacks.py###############################################################################
#
# CppExtensionCallbacks.py --
#
# $LastChangedDate$
# $LastChangedRevision$
# $LastChangedBy$
#
# Author: ltomaso
#
# History:
# March 5, 2013 - initial revision
#
###############################################################################
# method called when the extension is loaded
def onInit(context):
if context == 'DesignXplorer':
ExtAPI.Log.WriteMessage('onInit DX')
dlldir = System.IO.Path.Combine(ExtAPI.ExtensionMgr.CurrentExtension.InstallDir,System.IO.Path.Combine("bin",System.IO.Path.Combine("Win64","Release")))
cppoptimizerdll = System.IO.Path.Combine(dlldir,"CppOptimizerExample.dll")
# creates a ctypes library object
global opt
opt = ctypes.CDLL(cppoptimizerdll)
opt.AddDoubleVariable.argtypes = [ctypes.c_int32,ctypes.c_double,ctypes.c_double,ctypes.c_double]
opt.AddObjective.argtypes = [ctypes.c_int32,ctypes.c_int32,ctypes.c_double,ctypes.c_double]
opt.AddConstraint.argtypes = [ctypes.c_int32,ctypes.c_int32,ctypes.c_double,ctypes.c_double,ctypes.c_double]
opt.PutNumberOfSamples.argtypes = [ctypes.c_int32]
opt.CanRun.restype = ctypes.c_bool
opt.RunOptimization.restype = ctypes.c_int32
opt.PutMaximumNumberOfCandidates.argtypes = [ctypes.c_int32]
opt.GetInputValues.argtypes = [ctypes.c_int32,ctypes.POINTER(ctypes.c_double)]
opt.AddOutputValues.argtypes = [ctypes.c_int32,ctypes.c_bool,ctypes.POINTER(ctypes.c_double),ctypes.c_int32]
opt.GetNumberOfGeneratedCanidatePoints.restype = ctypes.c_int32
opt.GetCandidatePointValues.argtypes = [ctypes.c_int32,ctypes.POINTER(ctypes.c_double)]
opt.GetCostFunctionValues.argtypes = [ctypes.POINTER(ctypes.c_double),ctypes.POINTER(ctypes.c_bool)]
opt.GetStatus.restype = ctypes.c_wchar_p
ExtAPI.Log.WriteMessage('onInit DX - end')
# method called when extension is unloaded
def onTerminate(context):
if context == 'DesignXplorer':
ExtAPI.Log.WriteMessage('onTerminate DX')
global opt
# cleans up by removing reference to the ctypes library object
libHandle = opt._handle
del opt
# unloads the DLL
if System.IntPtr.Size == 8:
ctypes.windll.kernel32.FreeLibrary.argtypes = [ctypes.c_void_p]
ctypes.windll.kernel32.FreeLibrary(libHandle)
PK NS)L8In; n; J ACT Templates for DesignXplorer_R190/CppOptimizer/CppOptimizationMethod.py###############################################################################
#
# CppOptimizationMethod.py --
#
# $LastChangedDate$
# $LastChangedRevision$
# $LastChangedBy$
#
# Author: ltomaso
#
# History:
# March 5, 2013 - initial revision
# May 13, 2013 - switch to the new API (Ansys.DesignXplorer.API.Common).
# - IDXOptimizationServices has been renamed IOptimizationServices and derives from IServices
# - IDXOptimizationMethod has been renamed IOptimizationMethod and derives from IMethod
# - IDXOptimizationPoint has been renamed IOptimizationPoint and derives from IPoint
#
###############################################################################
clr.AddReference('Ans.ComponentSystem.Interop')
from Ans.ComponentSystem import (
IListCpp, VariantColl, IEnumeratorCpp
)
import os
import string
clr.AddReference('Ans.Utilities')
dxpath = Ansys.Utilities.ApplicationConfiguration.DefaultConfiguration.GetModuleBinDir('Addins/DesignXplorer')
sys.path.append(dxpath)
clr.AddReference('Ans.DesignXplorer.PublicAPIs')
from Ansys.DesignXplorer.API.Common import (
IServices, IMethod,
IPoint, enumPointState
)
from Ansys.DesignXplorer.API.Optimization import (
IOptimizationServices, IOptimizationMethod,
IOptimizationPoint, DXOptimizationPoint,
IConvergenceData, DXConvergenceData,
IConvergenceDescription, DXConvergenceDescription,
enumGoalType, enumConstraintType,
enumPostProcessingType,
enumCurveType
)
import random
import math
import ctypes
# Parameter class for continuous input parameter (double variable)
# continuous input parameters with manufacturable values (double list variable) are not supported by this optimizer
# discrete input parameters (integer list variable) are not supported by this optimizer
class DoubleVariable(object):
def __init__(self,id,lb,ub,iv):
self._id = id
self._lowerbound = lb
self._upperbound = ub
# current value of the starting point (if the optimizer starts from an initial point)
self._initialvalue = iv
# Parameter class for continuous input parameter (double variable)
# continuous input parameters with manufacturable values (double list variable) are not supported by this optimizer
# discrete input parameters (integer list variable) are not supported by this optimizer
class DoubleListVariable(object):
def __init__(self,id,vals,iv):
self._id = id
numvals = IListCpp.Count(vals);
self._values = (ctypes.c_double * nbvals)()
enume = IListCpp.GetEnumerator(vals)
i = 0
while IEnumeratorCpp.MoveNext(enume):
val = IEnumeratorCpp.Current.GetValue(enume)
self._values[i] = ctypes.c_double(val);
i = i + 1
# current value of the starting point (if the optimizer starts from an initial point)
self._initialvalue = ctypes.c_double(iv);
# Objective class
class Objective(object):
def __init__(self,id,type,val,imp):
self._id = id
self._goalvalue = val
self._importance = imp
self._type = 0
if type == enumGoalType.eGT_MinimumPossible:
self._type = 1
elif type == enumGoalType.eGT_MaximumPossible:
self._type = 2
elif type == enumGoalType.eGT_SeekTarget:
self._type = 3
# Constraint class
class Constraint(object):
def __init__(self,id,type,val1,val2,imp,strict):
self._id = id
self._type = 0
if type == enumConstraintType.eCT_LessThanTarget:
self._type = 1
elif type == enumConstraintType.eCT_GreaterThanTarget:
self._type = 2
elif type == enumConstraintType.eCT_NearTarget:
self._type = 3
elif type == enumConstraintType.eCT_InsideBounds:
self._type = 4
self._value1 = val1
self._value2 = val2
self._importance = imp
#self._strict = strict
# PythonOptimizer class
class PythonWrapperOptimizer(IOptimizationMethod):
# initializes PythonOptimizer
def __init__(self):
global opt
self._outputs = enumPostProcessingType.ePPT_Candidates | enumPostProcessingType.ePPT_Samples
self._settings = {}
self._candidates = None
self._samples = VariantColl()
self._parameters = []
#self._outputs = []
self._inputparameters = []
self._outputparameters = []
self._doublevars = []
self._doublelistvars = []
self._integerlistvars = []
self._objectives = []
self._constraints = []
self._services = None
self._init = False;
# sets IOptimizationServices
def set_Services(self,value):
self._services = value
# returns value of optimization setting
def get_Setting(self,key):
return self._settings[key]
# puts value of optimization setting
def put_Setting(self,key,value):
self._settings[key] = value
# returns post-processing type
def get_PostProcessingTypes(self):
return self._outputs
# returns candidate points
def get_Candidates(self):
return self._candidates
#returns sample points
def get_Samples(self):
return self._samples
# definition of double variable
def AddDoubleVariable(self,id,lb,ub,iv):
p = DoubleVariable(id,lb,ub,iv)
self._doublevars.append(p)
self._inputparameters.append(id)
self._parameters.append(id)
# integer list variable is ignored: not supported by this optimizer
def AddIntegerListVariable(self,id,vals,iv):
#p = ListVariable(id,vals,iv)
#self._integerlistvars.append(p)
#self._inputparameters.append(id)
self._parameters.append(id)
pass
# double list variable is ignored: not supported by this optimizer
def AddDoubleListVariable(self,id,vals,iv):
#p = DoubleListVariable(id,vals,iv)
#self._doublelistvars.append(p)
#self._inputparameters.append(id)
self._parameters.append(id)
# definition of output parameter is ignored
def AddOutput(self,id):
self._outputparameters.append(id)
self._parameters.append(id)
# creates an objective and adds it to the list of objectives
def AddObjective(self,id,type,val,imp):
o = Objective(id,type,val,imp)
self._objectives.append(o)
# creates a constraint and adds it to the list of constraints
def AddConstraint(self,id,type,val1,val2,imp,strict):
c = Constraint(id,type,val1,val2,imp,strict)
self._constraints.append(c)
# returns true when all optimization settings are defined and correct and the optimizer is ready to run
def CanRun(self, errorMessage):
return True
# runs optimization
def Run(self):
ExtAPI.Log.WriteMessage('Run')
#System.Diagnostics.Debugger.Break()
# initializes the C++ optimizer
self.InitOptimizer()
# resets the list of candidate points
self._candidates = None
global opt
numinputs = len(self._inputparameters)
# runs C++ optimizer
iter = 1
numpts = opt.RunOptimization()
while numpts > 0:
ipt = 0
pts = []
# gets input parameters values from C++ optimizer
while ipt < numpts:
dblvals = (ctypes.c_double * numinputs)()
opt.GetInputValues(ipt,ctypes.cast(dblvals,ctypes.POINTER(ctypes.c_double)))
pts.append(dblvals)
ipt = ipt + 1
# converts list of double values to list of optimization points
pointsToCalculate = self.GenerateOptimizationPoints(pts,True)
# calculates optimization points
IOptimizationServices.CalculatePoints(self._services,pointsToCalculate)
# pushes calculated optimization points to C++ optimizer
self.PushOutputValues(pointsToCalculate)
# promotes all points as history points
enume = pointsToCalculate.GetEnumerator()
while IEnumeratorCpp.MoveNext(enume):
optpt = IEnumeratorCpp.Current.GetValue(enume)
if optpt.State == enumPointState.ePS_UpToDate:
IOptimizationServices.PushHistoryPoint(self._services,optpt)
self._samples.Add(optpt)
if opt.GetNumberOfGeneratedCanidatePoints() > 0:
feasible = (ctypes.c_bool * 1)()
cost = (ctypes.c_double * 1)()
opt.GetCostFunctionValues(ctypes.cast(cost,ctypes.POINTER(ctypes.c_double)),ctypes.cast(feasible,ctypes.POINTER(ctypes.c_bool)))
data = DXConvergenceData()
data.put_Value(0,iter,cost[0],feasible[0])
IOptimizationServices.PushConvergenceData(self._services,data)
# stops the optimization algorithm if the user has stopped the optimization run
if IOptimizationServices.Stopped.GetValue(self._services):
break
# runs C++ optimizer
numpts = opt.RunOptimization()
iter = iter + 1
# end of C++ optimization
# gets candidate points from C++ optimizer
numcandidates = opt.GetNumberOfGeneratedCanidatePoints()
ic = 0
numparams = len(self._parameters)
candidates = []
while ic < numcandidates:
dblvals = (ctypes.c_double * numparams)()
opt.GetCandidatePointValues(ic,ctypes.cast(dblvals,ctypes.POINTER(ctypes.c_double)))
candidates.append(dblvals)
ic = ic + 1
# converts list of candidate values to list of optimization points
self._candidates = self.GenerateOptimizationPoints(candidates,False)
# output settings
self._settings["MyOptimizationStatus"] = opt.GetStatus()
def InitOptimizer(self):
global opt
# checks whether the C++ optimizer has already been created and initialized
if self._init == True:
pass
# creates optimizer
# definition of variables
doubleVarIdx = 0
doubleListVarIdx = 0
integerListVarIdx = 0
ip = 0
# loop on input parameters
for input in self._inputparameters:
# double variable ?
if doubleVarIdx < self._doublevars.Count and self._doublevars[doubleVarIdx]._id == input:
# adds double variable
var = self._doublevars[doubleVarIdx]
opt.AddDoubleVariable(ip,var._lowerbound,var._upperbound,var._initialvalue)
doubleVarIdx = doubleVarIdx + 1
else:
# double list variable ?
if doubleListVarIdx < self._doublelistvars.Count and self._doublelistvars[doubleListVarIdx]._id == input:
# adds double list variable
var = self._doublelistvars[doubleListVarIdx]
opt.AddDoubleListVariable(ip,ctypes.cast(var._values,ctypes.POINTER(ctypes.c_double)), len(var._values),var._initialvalue)
doubleVarIdx = doubleVarIdx + 1
#else:
# # integer list variable ?
# if integerListVarIdx < self._integerlistvars.Count and self._integerlistvars[integerListVarIdx]._id == input:
# #add integer list variable
# var = self._integerlistvars[integerListVarIdx]
# self._opt.AddDoubleVariable(input,ctypes.cast(var._values,ctypes.POINTER(ctypes.c_double)), len(var._values),var._initialvalue)
# integerListVarIdx = integerListVarIdx + 1
ip = ip + 1
#opt.PutNumberOfOutputs(len(_outputparameters))
ip = 0
numinputs = len(self._inputparameters)
numoutputs = len(self._outputparameters)
iobj = 0
iconstr = 0
for param in self._parameters:
if iobj < self._objectives.Count and param == self._objectives[iobj]._id:
opt.AddObjective(ip,self._objectives[iobj]._type,self._objectives[iobj]._goalvalue,self._objectives[iobj]._importance)
iobj = iobj + 1
if iconstr < self._constraints.Count and param == self._constraints[iconstr]._id:
opt.AddConstraint(ip,self._constraints[iconstr]._type,self._constraints[iconstr]._value1, self._constraints[iconstr]._value2, self._constraints[iconstr]._importance)#, self._constraints[iconstr]._strict)
iconstr = iconstr + 1
ip = ip + 1
# forwards optimization settings to the C++ optimizer
self.PutSettings()
self._init = True
# forwards optimization settings to the C++ optimizer
def PutSettings(self):
global opt
for key in self._settings:
if key == 'MyNumberOfSamples':
opt.PutNumberOfSamples(self._settings[key])
if key == 'MyMaximumNumberOfCandidates':
opt.PutMaximumNumberOfCandidates(self._settings[key])
# converts list of double values to list of optimization points (with or without output parameter values)
def GenerateOptimizationPoints(self,values,onlyinputs):
numpts = len(values)
if numpts == 0:
return null
points = VariantColl()
ptIdx = 0
for ptvalues in values:
point = DXOptimizationPoint()
point.ID = 'DP %(id)04d' % {"id" : ptIdx}
ip = 0
for input in self._inputparameters:
var = ptvalues[ip]
point.put_Value(input,var)
ip = ip + 1
if onlyinputs == False:
for output in self._outputparameters:
var = ptvalues[ip]
IOptimizationPoint.put_Value(point, output,var)
ip = ip + 1
points.Add(point)
return points
# converts calculated optimization points to list of double values to push them into the C++ optimizer
def PushOutputValues(self,points):
global opt
numoutputs = len(self._outputparameters)
ip = 0
enume = points.GetEnumerator()
while IEnumeratorCpp.MoveNext(enume):
pt = IEnumeratorCpp.Current.GetValue(enume)
iout = 0
dblvals = (ctypes.c_double * numoutputs)()
state = False
if pt.State == enumPointState.ePS_UpToDate:
state = True
for output in self._outputparameters:
var = IOptimizationPoint.get_Value(pt, output)
dblvals[iout] = ctypes.c_double(var)
iout = iout + 1
opt.AddOutputValues(ip, state, ctypes.cast(dblvals,ctypes.POINTER(ctypes.c_double)),numoutputs)
ip = ip + 1
# end of the class
PK NS)L
2
J ACT Templates for DesignXplorer_R190/CppOptimizer/CppOptimizerCallbacks.py###############################################################################
#
# CppOptimizerCallbacks.py --
#
# $LastChangedDate$
# $LastChangedRevision$
# $LastChangedBy$
#
# Author: ltomaso
#
# History:
# March 5, 2013 - initial revision
#
###############################################################################
# creation of python wrapper optimizer
def createPythonWrapperOptimizer(entity):
ExtAPI.Log.WriteMessage('Create PythonWrapperOptimizer')
pythonwrapper = PythonWrapperOptimizer()
return pythonwrapper
# returns true when all optimization settings are defined and correct and the optimizer is ready to run
def canRunOptimizer(entity):
maximumNumberOfCandidates = entity.Properties["MyMaximumNumberOfCandidates"].Value
numberOfSamples = entity.Properties["MyNumberOfSamples"].Value
if maximumNumberOfCandidates <= 0 or maximumNumberOfCandidates > numberOfSamples:
return False;
if numberOfSamples <= 0 or numberOfSamples > 10000:
return False;
return True
# returns a brief description of the optimization algorithm
def getDescription(entity):
description = "Random screening - C++ Example"
return description
# returns a brief description of the optimization configuration
def getConfiguration(entity):
maximumNumberOfCandidates = entity.Properties["MyMaximumNumberOfCandidates"].Value
numberOfSamples = entity.Properties["MyNumberOfSamples"].Value
configuration = 'Generates %d random points, and extracts %d candidates.' %(numberOfSamples,maximumNumberOfCandidates)
return configuration
# returns a quick help message when canRunOptimizer returns false
def getQuickHelp(entity):
maximumNumberOfCandidates = entity.Properties["MyMaximumNumberOfCandidates"].Value
numberOfSamples = entity.Properties["MyNumberOfSamples"].Value
if numberOfSamples <= 0 or numberOfSamples > 10000:
return 'Number of Samples must be positive and lower than 10000'
if maximumNumberOfCandidates <= 0 or maximumNumberOfCandidates > numberOfSamples:
return 'Maximum Number of Candidates must be positive and lower than Number of Samples'
return ''
# returns the optimization status
def getStatus(entity):
for prop in entity.AllProperties:
if prop.Name == 'MyOptimizationStatus':
return prop.Value
return ''
# returns the convergence description interface
def getConvergenceDescription(entity):
des = DXConvergenceDescription()
des.AddGroup("Cost Convergence")
des.AddCurve(0,"Minimum Cost",enumCurveType.eCT_Convergence,True)
des.XAxisLabel = "Number of iterations"
des.YAxisLabel = "Cost Value"
return des
def release(entity):
global opt
opt.Clear()
PK NS)L;$ $ M ACT Templates for DesignXplorer_R190/CppOptimizer/CppOptimizerExample.vcxproj
Debugx64Releasex64DebugLinux64ReleaseLinux64{04E1D377-6464-4A33-B3E3-F5D6F37434C4}CppOptimizerExampleManagedCProjDynamicLibraryUnicodev110DynamicLibraryUnicodev110DynamicLibraryNotSetDynamicLibraryNotSet
<_ProjectFileVersion>10.0.40219.1
bin\Win64\$(Configuration)\obj\Win64\$(Configuration)\CppOptimizerExample\truebin\Win64\$(Configuration)\obj\Win64\$(Configuration)\CppOptimizerExample\truebin\Linux64\$(Configuration)\obj\Linux64\$(Configuration)\CppOptimizerExample\truebin\Linux64\$(Configuration)\obj\Linux64\$(Configuration)\CppOptimizerExample\trueDisabledWIN32;WIN64;_WIN64;_M_AMD64;_DEBUG;_WINDOWS;_USRDLL;CPPOPTIMIZEREXAMPLE_EXPORTS;%(PreprocessorDefinitions)MultiThreadedDebugDLLLevel3ProgramDatabase$(OutDir)CppOptimizerExample.dlltrueMachineX64WIN32;WIN64;_WIN64;_M_AMD64;NDEBUG;_WINDOWS;_USRDLL;CPPOPTIMIZEREXAMPLE_EXPORTS;%(PreprocessorDefinitions)MinSpaceMultiThreadedDLLLevel3ProgramDatabase$(OutDir)CppOptimizerExample.dllfalsetruetrueMachineX64_DEBUG;UNIX;LINUX;CPPOPTIMIZEREXAMPLE_EXPORTS;%(PreprocessorDefinitions)-fPIC -g -m64 %(AdditionalOptions)DisabledMultiThreadedDebugDLLLevel3ProgramDatabase$(OutDir)libCppOptimizerExample.so-g -rdynamic -m64 -Wl,-rpath,'$ORIGIN' %(AdditionalOptions)truefalseNotSettrueNDEBUG;UNIX;LINUX;CPPOPTIMIZEREXAMPLE_EXPORTS;%(PreprocessorDefinitions)-fPIC -m64 %(AdditionalOptions)DisabledMultiThreadedDLLLevel3ProgramDatabase$(OutDir)libCppOptimizerExample.so-rdynamic -m64 -Wl,-rpath,'$ORIGIN' %(AdditionalOptions)truefalseNotSettruePK NS)Lj& I ACT Templates for DesignXplorer_R190/CppOptimizer/README_CppOptimizer.txt###############################################################################
#
# README_CppOptimizer.txt --
#
# $LastChangedDate$
# $LastChangedRevision$
# $LastChangedBy$
#
# Author: Stphane MARGUERIN
#
# History:
# March 5, 2013 - initial revision
#
###############################################################################
CONTENT:
-----------
CppExtensionCallbacks.py - implementation of the extension callbacks
CppOptimizerCallbacks.py - implementation of the optimizer callbacks
CppOptimizationMethod.py - implementation of the IOptimizationMethod, wrapping calls to C/C++ routines.
CppOptimizerExample.vcxproj - Visual C++ project file for the CppOptimizerExample project
CppOptimizerExample/ - sub-directory of the CSharpOptimizerExample project
CppOptimizerExample/CppOptimizerExample.h - C++ header declaring the CppOptimizer classes and routines
CppOptimizerExample/CppOptimizerExample.cpp - C++ implementation of the CppOptimizer
BUILDING INSTRUCTIONS:
-------------------------
1. Open CppOptimizerExample.vcxproj with Microsoft Visual Studio
2. Set the Solution Configuration to "Release"
3. Set the Solution Platform to "Win64"
4. Build the solution
=> Library bin/Win64/Release/CppOptimizerExample.dll is generated.
5. You can exit Visual Studio and start using the extension in ANSYS Workbench.
###############################################################################
PK NS)LG8+ j j [ ACT Templates for DesignXplorer_R190/CppOptimizer/bin/Win64/Release/CppOptimizerExample.dllMZ @ !L!This program cannot be run in DOS mode.
$ l(l(l(lC"lC*lC-l(m6l*lNk)lNk)lNk)lNk)lRich(l PE d TZ " > ( C ` @f b P PU p P .text = > `.rdata P B @ @.data 0 p ^ @ .pdata ` @ @.rsrc f @ @.reloc 0 h @ B H\$Hl$Ht$WH IHH;tLHr0HvHHH^HH HVHO G0FG1FG2HFHG8FG@H;uH\$0Hl$8Ht$@HH _H\$Ht$WH IHH;tMHy0HWH" HWHK HHC0GHHCGCHGHCGȈCHGH;uHt$8HH\$0H _H;tlH\$WH HHYHCHCHHKHt. H# Hc Hc HKHtq. Hc Hc Hc HHHCH;uH\$0H _H;twH\$Hl$Ht$WH IHHy0HOH- HOHS C0C1HHGC2GHC8HGC@GHGH;uH\$0Hl$8Ht$@H _H8HD$ +MtHI H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