yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Quintiq file version 2.0
#parent: pnlToolbar/btnGenerateTestSet1
Response OnClick () id:Response_pnlToolbar_btnGenerateTestSet1_OnClick
{
  #keys: '[136398.1.390718982]'
  Body:
  [*
    snapshot := dhSnapshot.Data();
    snapshot.Label( relnew, Name := "Dataset",     Value :=  "Test_0001" );
    snapshot.Label( relnew, Name := "Horizon",     Value :=  "Today" );
    snapshot.Label( relnew, Name := "Plan type",   Value :=  "Depot 01" );
    
    snapshot.Value( relnew, Name := "Total costs",       Value := Real::Random( 10000.00, 1e6 ) );
    snapshot.Value( relnew, Name := "Efficiency",        Value := Real::Random( 0.1, 0.99 ) );
    snapshot.Value( relnew, Name := "Empty Km",          Value := Real::Random( 50.0, 2500.0 ) );
    snapshot.Value( relnew, Name := "Order fulfillment", Value := Real::Random( 0.0, 1.0 ) );
    snapshot.Value( relnew, Name := "Trucks used",       Value := [Real]Number::Random( 10, 100 ) );
    snapshot.Value( relnew, Name := "Driver overtime",   Value := [Real]Number::Random( 10, 1000 ), Description := "The amount of overtime for drivers expressed in minutes" );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    FeedbackObject::AddHard( not isnull( KpiTracker ), Translations::Kpi_NoDatasetSelected() );
    return FeedbackObject::IsAllowed();
  *]
}