jmadem

## Class construct_allocations

- java.lang.Object
- - DefaultInternalAction
  - - jmadem.construct_allocations

-     public class construct_allocations
      extends DefaultInternalAction

  Internal function for constructing a set of allocations by instantiating task slots to element values.

  Use:
  ``

  jmadem.construct_allocations( | TaskWithAllParameters, |
  | [Slots], |
  | [ [ElementValues] | ListOfElementValues ], |
  | AllocationsOut ) |

  Example:
  ``

  jmadem.construct_allocations( | use(coffeeMachine, age), |
  | [age], |
  | [ [doug, norman] ], |
  | [use(cofeeMachine, doug), use(cofeeMachine, norman)] ) |

  Author:
    Francisco Grimaldo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) MADeMAgArch` | `agArch`
    `(package private) ListTerm` | `allocs`
    `(package private) java.util.List<Term>` | `elements`
    `(package private) ListTerm` | `fFuncs`
    `(package private) Literal` | `instantiated_task`
    `(package private) java.util.logging.Logger` | `logger`
    `(package private) java.util.List<Term>` | `params`
    `private static long` | `serialVersionUID`
    `(package private) java.util.List<Term>` | `slots`
    `(package private) Literal` | `task`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `construct_allocations()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `execute(TransitionSystem ts, Unifier un, Term[] args)`
    `(package private) void` | `instantiate_task(int id_params, int id_slots)` Constructs the set of allocations by instantiating the slots with the elements passed to the internal action.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

    - #### logger

          java.util.logging.Logger logger

    - #### task

          Literal task

    - #### instantiated_task

          Literal instantiated_task

    - #### params

          java.util.List<Term> params

    - #### slots

          java.util.List<Term> slots

    - #### elements

          java.util.List<Term> elements

    - #### allocs

          ListTerm allocs

    - #### fFuncs

          ListTerm fFuncs

    - #### agArch

          MADeMAgArch agArch

  - ### Constructor Detail

    - #### construct_allocations

          public construct_allocations()

  - ### Method Detail

    - #### execute

          public java.lang.Object execute(TransitionSystem ts,
                                 Unifier un,
                                 Term[] args)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### instantiate_task

          void instantiate_task(int id_params,
                              int id_slots)

      Constructs the set of allocations by instantiating the slots with the elements passed to the internal action.
      Parameters:
        `id_params` - index over the parameters of the task
        `id_slots` - index over the slots being considered