version 0.0.1
This commit is contained in:
@@ -4,9 +4,23 @@ from abc import ABCMeta, abstractmethod
|
||||
class AbstractProblem(metaclass=ABCMeta):
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def input_variables(self):
|
||||
pass
|
||||
variables = []
|
||||
|
||||
if hasattr(self, 'spatial_variables'):
|
||||
variables += self.spatial_variables
|
||||
if hasattr(self, 'temporal_variable'):
|
||||
variables += self.temporal_variable
|
||||
if hasattr(self, 'parameters'):
|
||||
variables += self.parameters
|
||||
if hasattr(self, 'custom_variables'):
|
||||
variables += self.custom_variables
|
||||
|
||||
return variables
|
||||
|
||||
@input_variables.setter
|
||||
def input_variables(self, variables):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user