Instance

public abstract class Instance<T extends Entity<?>>

Represent an instance of a modelling entity

Parameters:
  • <T> – Type of the father entity

Methods

public T entity()
Returns:Get the algebraic entity this instance is part of
public String name()
Returns:The instance’s name
public String toString()

Returns a string representation of the instance.

For constraints and objective instances it is equivalent to the AMPL statement:

expand instanceName;

For set and variable instances see the documentation for the specific class.