def determineRequiredBallast(self):
    if (not self.assert_selection_valid()):
        return
    code = 'from DAVE.solvers.ballast import force_vessel_to_evenkeel_and_draft'
    code += '\ns["{}"].empty_all_usable_tanks()'.format(self._bs.name)
    code += '\ns.required_ballast = force_vessel_to_evenkeel_and_draft(scene=s,vessel="{}",z={})'.format(self._vesselNode.name, self.ui.doubleSpinBox.value())
    self.guiRunCodeCallback(code, guiEventType.MODEL_STATE_CHANGED)
    self.ui.tableWidget.item(0, 0)
    self.ui.tableWidget.setItem(0, 0, QtWidgets.QTableWidgetItem(str((- self.guiScene.required_ballast[0]))))
    self.ui.tableWidget.setItem(0, 1, QtWidgets.QTableWidgetItem(str(self.guiScene.required_ballast[1])))
    self.ui.tableWidget.setItem(0, 2, QtWidgets.QTableWidgetItem(str(self.guiScene.required_ballast[2])))
def determineRequiredBallast(self):
    if (not self.assert_selection_valid()):
        return
    code = 'from DAVE.solvers.ballast import force_vessel_to_evenkeel_and_draft'
    code += '\ns["{}"].empty_all_usable_tanks()'.format(self._bs.name)
    code += '\ns.required_ballast = force_vessel_to_evenkeel_and_draft(scene=s,vessel="{}",z={})'.format(self._vesselNode.name, self.ui.doubleSpinBox.value())
    self.guiRunCodeCallback(code, guiEventType.MODEL_STATE_CHANGED)
    self.ui.tableWidget.item(0, 0)
    self.ui.tableWidget.setItem(0, 0, QtWidgets.QTableWidgetItem(str((- self.guiScene.required_ballast[0]))))
    self.ui.tableWidget.setItem(0, 1, QtWidgets.QTableWidgetItem(str(self.guiScene.required_ballast[1])))
    self.ui.tableWidget.setItem(0, 2, QtWidgets.QTableWidgetItem(str(self.guiScene.required_ballast[2])))