9 #ifndef CMZN_OPTIMISATION_HPP__ 10 #define CMZN_OPTIMISATION_HPP__ 12 #include "opencmiss/zinc/optimisation.h" 13 #include "opencmiss/zinc/fieldassignment.hpp" 14 #include "opencmiss/zinc/fieldmodule.hpp" 32 cmzn_optimisation_id id;
40 explicit Optimisation(cmzn_optimisation_id in_optimisation_id) :
41 id(in_optimisation_id)
45 id(cmzn_optimisation_access(optimisation.id))
50 cmzn_optimisation_id temp_id = cmzn_optimisation_access(optimisation.id);
53 cmzn_optimisation_destroy(&
id);
63 cmzn_optimisation_destroy(&
id);
223 return Field(cmzn_optimisation_get_conditional_field(
id, independentField.
getId()));
244 return cmzn_optimisation_set_conditional_field(
id, independentField.
getId(), conditionalField.
getId());
270 return cmzn_optimisation_add_fieldassignment(this->
id, fieldassignment.
getId());
280 return static_cast<Method>(cmzn_optimisation_get_method(
id));
291 return cmzn_optimisation_set_method(
id,
292 static_cast<cmzn_optimisation_method>(method));
303 return cmzn_optimisation_get_attribute_integer(
id,
304 static_cast<cmzn_optimisation_attribute>(attribute));
318 return cmzn_optimisation_set_attribute_integer(
id,
319 static_cast<cmzn_optimisation_attribute>(attribute), value);
330 return cmzn_optimisation_get_attribute_real(
id,
331 static_cast<cmzn_optimisation_attribute>(attribute));
344 return cmzn_optimisation_set_attribute_real(
id,
345 static_cast<cmzn_optimisation_attribute>(attribute), value);
356 return Field(cmzn_optimisation_get_first_independent_field(
id));
378 return Field(cmzn_optimisation_get_next_independent_field(
id, refField.
getId()));
396 return (cmzn_optimisation_add_independent_field(
id, field.
getId()));
408 return (cmzn_optimisation_remove_independent_field(
id, field.
getId()));
419 return Field(cmzn_optimisation_get_first_objective_field(
id));
441 return Field(cmzn_optimisation_get_next_objective_field(
id, refField.
getId()));
460 return (cmzn_optimisation_add_objective_field(
id, field.
getId()));
472 return (cmzn_optimisation_remove_objective_field(
id, field.
getId()));
483 return cmzn_optimisation_get_solution_report(
id);
494 return cmzn_optimisation_optimise(
id);
501 return Optimisation(cmzn_fieldmodule_create_optimisation(
id));
Definition: optimisation.hpp:118
Definition: optimisation.hpp:172
A description of a non-linear optimisation problem.
Definition: optimisation.hpp:29
Field getNextIndependentField(const Field &refField)
Definition: optimisation.hpp:376
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
Definition: optimisation.hpp:110
Method
Definition: optimisation.hpp:83
Optimisation createOptimisation()
Definition: optimisation.hpp:499
int removeObjectiveField(const Field &field)
Definition: optimisation.hpp:470
Field getNextObjectiveField(const Field &refField)
Definition: optimisation.hpp:439
int setMethod(Method method)
Definition: optimisation.hpp:289
cmzn_fieldassignment_id getId() const
Definition: fieldassignment.hpp:101
int addIndependentField(const Field &field)
Definition: optimisation.hpp:394
Object for assigning values of a field from a source field.
Definition: fieldassignment.hpp:44
Definition: optimisation.hpp:126
int setAttributeReal(Attribute attribute, double value)
Definition: optimisation.hpp:342
int setConditionalField(const Field &independentField, const Field &conditionalField)
Definition: optimisation.hpp:242
Attribute
Definition: optimisation.hpp:108
Definition: optimisation.hpp:88
cmzn_field_id getId() const
Definition: field.hpp:103
Field getFirstIndependentField()
Definition: optimisation.hpp:354
Definition: optimisation.hpp:154
int setAttributeInteger(Attribute attribute, int value)
Definition: optimisation.hpp:316
Definition: optimisation.hpp:189
Field getFirstObjectiveField()
Definition: optimisation.hpp:417
Method getMethod()
Definition: optimisation.hpp:278
Field getConditionalField(const Field &independentField)
Definition: optimisation.hpp:221
double getAttributeReal(Attribute attribute)
Definition: optimisation.hpp:328
int removeIndependentField(const Field &field)
Definition: optimisation.hpp:406
Definition: optimisation.hpp:163
bool isValid() const
Definition: optimisation.hpp:72
Definition: optimisation.hpp:179
cmzn_optimisation_id getId() const
Definition: optimisation.hpp:207
int getAttributeInteger(Attribute attribute)
Definition: optimisation.hpp:301
int optimise()
Definition: optimisation.hpp:492
Definition: optimisation.hpp:134
char * getSolutionReport()
Definition: optimisation.hpp:481
The OpenCMISS namespace.
Definition: context.hpp:20
Definition: optimisation.hpp:95
Definition: optimisation.hpp:85
Definition: optimisation.hpp:144
int addFieldassignment(const Fieldassignment &fieldassignment)
Definition: optimisation.hpp:268
int addObjectiveField(const Field &field)
Definition: optimisation.hpp:458