def METHOD_NAME(self, x):
    self.graph.setGlobalVariables(self.xnames, x, "scaled", True)
    obj = self.graph.calcObjective()[0]
    if self.ofile != "":
        self.graph.writeCSV()  # write all graph input, output, err code, and solution time plus add objective
        self.flushc += 1
        if self.flushc % self.flushm == 0:
            self.graph.flushCSV()
    return obj