SDMP User Manual (ENG)
  • Introduction
    • Introduction to SDMP
  • Getting Started
    • Creating SDMP Project
  • Data Handling
    • Loading Input Data
      • Defining Input Data Schema
      • Creating Input Data
      • Loading Input Data
    • Retriving Data
    • Writing Output Data
      • Defining Output Data Schema
      • Adding Data Row
      • Writing to File
  • General Module
    • Overview
    • User Controls
      • StateControl
      • ActionControl
      • StateTransitionControl
      • BoundControl
      • ApproximationControl
      • SolverControl
      • EventControl
      • DataControl
      • LogControl
    • Data Model
      • State
      • StateActionMap
    • Example Problems
      • Car Resequencing Problem
      • Lot Sizing Problem
  • Routing Module
    • Overview
    • User Controls
      • CustomerControl
      • VehicleControl
    • Data Model
    • Example Problems
      • Vehicle Routing Problem
  • Scheduling Module
    • Overview
    • User Controls
    • Data Model
    • Example Problems
Powered by GitBook
On this page
  • GetStateTransitions
  • GetFinalStateTransition
  1. General Module
  2. User Controls

StateTransitionControl

Control for functions related to state transition

GetStateTransitions

public override List<StateTransition> GetStateTransitions(StateActionMap stateActionMap)

Definition

Returns the state transitions that will be transitioned to the next stage based on the defined StateActionMap.

Parameters

Type
Description

StateActionMap

The state to define the transitions.

Return

Type
Description
Default

List<StateTransition>

The state transition list.

Example (Default Logic)

public List<StateTransition> GetStateTransitions(StateActionMap stateActionMap) 
{
    List<StateTransition> trans = new List<StateTransition>();

    StateTransition tran = new StateTransition();

    tran.FromState = stateActionMap.PostActionState;
    tran.ToState = stateActionMap.PostActionState.Clone();
    tran.Cost = stateActionMap.Cost;

    trans.Add(tran);

    return trans;
}

GetFinalStateTransition

public override StateTransition GetFinalStateTransition(State state)

Definition

Defines a StateTransition from a given State to a final state.

Parameters

Type
Description

State

The state to transition to the final state.

Return

Type
Description
Default

StateTransition

State transition to the final state.

Example (Default Logic)

public virtual StateTransition GetFinalStateTransition(State state)
{
    DataModel.StateTransition tran = new DataModel.StateTransition();

    State finalState = new State();
    finalState.IsFinal = true;

    tran.FromState = state;
    tran.ToState = finalState;

    return tran;
}
PreviousActionControlNextBoundControl

Last updated 1 year ago

Default Logic
Default Logic