Follow us on Twitter and LinkedIn to get the latest updates from the dev team!
Represents an AMPL objective. Note that, in case of a scalar objective, all the properties (corresponding to AMPL suffixes) of the objective instance can be accessed through corresponding properties on the Objective itself. The properties have the same name of the corresponding AMPL suffixes. See http://www.ampl.com/NEW/suffbuiltin.html for a list of the available suffixes. An ArgumentException is thrown if one of such methods is called for a non-scalar objective. An ArgumentOutOfRangeException is thrown if any property of an entity which has been deleted from the underlying interpreter is accessed. The instances, represented by the class ampl.ObjectiveInstance can be accessed via the indexing operator, via the method ampl.Entities.Objective.Get or via the iterator provided. To gain access to all the values in an entity (for all instances and all suffixes for that entities), see ampl.Entities.Entity.GetValues and the ampl.DataFrame class.
ArgumentException
ArgumentOutOfRangeException
ampl.ObjectiveInstance
ampl.Entities.Objective.Get
ampl.Entities.Entity.GetValues
ampl.DataFrame
ampl.Entities
AMPL
Inheritance Hierarchy
Syntax
Properties
Methods
System.Object
ampl.Entities.Entity
ampl.Entities.Entity{ObjectiveInstance}
ampl.Entities.Objective
[ClassInterface(ClassInterfaceType.None)] public class Objective : Entity<ObjectiveInstance>, IEnumerable<ObjectiveInstance>, IEnumerable, IObjective
Return the AMPL status
System.String
public string Astatus { get; }
Exit code returned by solver after most recent solve with this objective
System.Int32
public int ExitCode { get; }
Get the sense of this objective, true if minimization, false if maximization
System.Boolean
public bool IsMinimization { get; }
Result message returned by solver after most recent solve with this objective
public string Message { get; }
Result string returned by solver after most recent solve with this objective
public string Result { get; }
Return the solver status
public string Sstatus { get; }
Get the value of this objective
System.Double
public double Value { get; }
Drop this objective
public void Drop()
ObjectiveInstance
public ObjectiveInstance Get(params object[] index)
public override ObjectiveInstance Get(Tuple t = null)
System.Collections.Generic.IEnumerator<ObjectiveInstance>
public override IEnumerator<ObjectiveInstance> GetEnumerator()
Restore this objective (if it had been dropped, no effect otherwise)
public void Restore()