The optimize Method
The optimize method for the MV-3010 model is shown
below.
def optimize (self):
# Define the cost functions in a list
obj = [self.resp]
# Define the weights for the cost functions in a list
wt = [1]
# Create the optimizer
opt = Optimizer ( label = "Optimize SLA3", # Label
objective = obj, # Objectives
weights = wt, # Weights
type = "STATICS", # Simulation Type
end = 4, # End Time
dtout = 0.04, # No. of steps
plot = True, # Display plots
)
# Now perform the optimization
x = opt.optimize (accuracy=1e-4)
# Return the result
return x