9 #ifndef CMZN_OPTIMISATION_HPP__
10 #define CMZN_OPTIMISATION_HPP__
12 #include "zinc/optimisation.h"
13 #include "zinc/fieldmodule.hpp"
31 cmzn_optimisation_id id;
39 explicit Optimisation(cmzn_optimisation_id in_optimisation_id) :
40 id(in_optimisation_id)
44 id(cmzn_optimisation_access(optimisation.id))
49 cmzn_optimisation_id temp_id = cmzn_optimisation_access(optimisation.id);
52 cmzn_optimisation_destroy(&
id);
62 cmzn_optimisation_destroy(&
id);
218 return static_cast<Method>(cmzn_optimisation_get_method(
id));
229 return cmzn_optimisation_set_method(
id,
230 static_cast<cmzn_optimisation_method>(method));
241 return cmzn_optimisation_get_attribute_integer(
id,
242 static_cast<cmzn_optimisation_attribute>(attribute));
256 return cmzn_optimisation_set_attribute_integer(
id,
257 static_cast<cmzn_optimisation_attribute>(attribute), value);
268 return cmzn_optimisation_get_attribute_real(
id,
269 static_cast<cmzn_optimisation_attribute>(attribute));
282 return cmzn_optimisation_set_attribute_real(
id,
283 static_cast<cmzn_optimisation_attribute>(attribute), value);
294 return Field(cmzn_optimisation_get_first_independent_field(
id));
316 return Field(cmzn_optimisation_get_next_independent_field(
id, refField.
getId()));
334 return (cmzn_optimisation_add_independent_field(
id, field.
getId()));
346 return (cmzn_optimisation_remove_independent_field(
id, field.
getId()));
357 return Field(cmzn_optimisation_get_first_objective_field(
id));
379 return Field(cmzn_optimisation_get_next_objective_field(
id, refField.
getId()));
398 return (cmzn_optimisation_add_objective_field(
id, field.
getId()));
410 return (cmzn_optimisation_remove_independent_field(
id, field.
getId()));
421 return cmzn_optimisation_get_solution_report(
id);
432 return cmzn_optimisation_optimise(
id);
439 return Optimisation(cmzn_fieldmodule_create_optimisation(
id));
Definition: optimisation.hpp:117
Definition: optimisation.hpp:171
A description of a non-linear optimisation problem.
Definition: optimisation.hpp:28
Field getNextIndependentField(const Field &refField)
Definition: optimisation.hpp:314
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
Definition: optimisation.hpp:109
Method
Definition: optimisation.hpp:82
Optimisation createOptimisation()
Definition: optimisation.hpp:437
int removeObjectiveField(const Field &field)
Definition: optimisation.hpp:408
Field getNextObjectiveField(const Field &refField)
Definition: optimisation.hpp:377
int setMethod(Method method)
Definition: optimisation.hpp:227
int addIndependentField(const Field &field)
Definition: optimisation.hpp:332
Definition: optimisation.hpp:125
int setAttributeReal(Attribute attribute, double value)
Definition: optimisation.hpp:280
Attribute
Definition: optimisation.hpp:107
Definition: optimisation.hpp:87
cmzn_field_id getId() const
Definition: field.hpp:98
Field getFirstIndependentField()
Definition: optimisation.hpp:292
Definition: optimisation.hpp:153
int setAttributeInteger(Attribute attribute, int value)
Definition: optimisation.hpp:254
Definition: optimisation.hpp:188
Field getFirstObjectiveField()
Definition: optimisation.hpp:355
Method getMethod()
Definition: optimisation.hpp:216
double getAttributeReal(Attribute attribute)
Definition: optimisation.hpp:266
int removeIndependentField(const Field &field)
Definition: optimisation.hpp:344
Definition: optimisation.hpp:162
bool isValid() const
Definition: optimisation.hpp:71
Definition: optimisation.hpp:178
cmzn_optimisation_id getId() const
Definition: optimisation.hpp:206
int getAttributeInteger(Attribute attribute)
Definition: optimisation.hpp:239
int optimise()
Definition: optimisation.hpp:430
Definition: optimisation.hpp:133
char * getSolutionReport()
Definition: optimisation.hpp:419
Definition: optimisation.hpp:94
Definition: optimisation.hpp:84
Definition: optimisation.hpp:143
int addObjectiveField(const Field &field)
Definition: optimisation.hpp:396