The OpenStudio Analysis Spreadsheet is a tool built just for this purpose. It applies a measure based workflow to an OpenStudio model and makes this workflow available to several class of Optimization (Calibration) algorithms in addition to sampling, design of experiments and others. The spreadsheet tool can be found at https://github.com/NREL/OpenStudio-analysis-spreadsheet.
It sounds like there may already be measures for what you want to change. The https://bcl.nrel.gov is a good resource for existing measures. The spreadsheet documentation will lead you through setting up a problem for optimization. There are also a few canned examples you can run.
OpenStudio-Server has the following algorithms in it:
Multi-Objective optimization
- NSGA2 (Non-dominated Sorting Genetic Algorithm)
Parallel F evaluations
Mixed Continuous or Discrete variables
- SPEA2 (Strength Pareto Evolutionary Algorithm)
Parallel F evaluations
Continuous variables only
Single-Objective optimization
Rgenoud (GENetic Optimized Using Derivatives)
Parallel F evaluations for genetic search
Parallel gradient calculation for continuous variables
Optim (quasi-Newton method with bounds)
Parallel gradient calculation
Continuous variables only
Since you want to use discrete variables in your optimization, I suggest using the NSGA2 multi-objective solver. This will allow you to find trade offs between Gas vs Electric, heating vs cooling, etc. There are also visualization tools avail on thru OS-Server to find parateo fronts and to visualize them on a parallel coordinate plot to look at sensitivities and ranges of "optimal" parameters.
NSGA2 is a genetic based algorithm. Loosely speaking, it will start with an initial population which is a sample of your variable space. It will then sort and rank the population and only keep the "best" values. It will then create a new population based off the previous best values and continue the process for a fixed number of "generations". I've had very good success using this algorithm for both Optimization and Calibration with OpenStudio.
Update: I tried the following, but got an error message ... java.lang.ArrayIndexOutOfBoundsException: 0
Main = GPSPSOCCHJ; NeighborhoodTopology = vonNewmann; // gbest | lbest | vonNewmann NeighborhoodSize = 1; // 0< ... Ignored for vonNewman and gbest NumberOfParticle = #{10n_vars}; NumberOfGeneration = 15; Seed = 12; CognitiveAcceleration = 1.5; SocialAcceleration = 1.5; MaxVelocityGainContinuous = 1; MaxVelocityDiscrete = 1; ConstrictionGain = 0.8; MeshSizeDivider = 2; InitialMeshSizeExponent = 0; MeshSizeExponentIncrement = 1; NumberOfStepReduction = 4; *
I would need the full error message and probably also the files needed to reproduce it. The following values work for
in example/quad/GPSPS