#include "Include/model_from_solver_generator.h"
#include "Include/objects.h"

void generate_model_result0(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result1(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 7;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result2(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 11;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result3(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result4(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result5(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result6(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment7;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result7(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result8(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result9(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result10(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result11(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result12(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result13(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result14(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result15(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result16(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 9;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result17(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result18(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result19(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment6;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment6;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result20(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result21(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result22(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train4 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment6;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment7;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result23(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result24(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result25(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 5;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result26(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[15] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) simplesegment10;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 11;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result27(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result28(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) simplesegment10;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result29(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result30(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result31(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[14] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 10;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result32(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) simplesegment4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result33(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 8;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result34(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result35(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 10;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result36(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment8;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result37(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result38(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result39(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 11;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result40(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[10] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) simplesegment4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  model->segment_count = 6;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result41(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result42(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[14] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment6;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 10;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result43(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result44(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result45(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result46(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result47(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 10;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result48(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result49(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result50(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result51(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment8;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result52(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[14] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 10;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result53(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result54(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result55(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result56(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result57(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result58(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment6;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result59(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 12;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result60(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 7;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result61(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 7;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result62(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result63(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result64(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result65(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result66(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result67(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result68(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result69(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result70(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result71(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 2;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result72(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result73(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment10;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[15] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) simplesegment0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 11;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result74(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result75(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result76(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result77(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result78(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  model->segment_count = 10;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result79(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result80(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[6] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[7] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result81(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result82(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result83(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result84(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result85(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 7;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result86(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 13;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result87(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 5;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result88(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result89(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result90(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 7;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result91(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment7;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result92(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result93(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result94(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train0 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment12;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result95(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 10;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result96(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result97(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[10] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 6;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result98(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment12;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result99(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result100(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 3;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result101(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result102(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result103(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result104(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result105(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result106(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result107(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[6] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[7] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 3;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result108(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result109(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result110(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result111(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[14] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 10;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result112(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result113(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result114(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment10;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result115(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result116(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result117(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment10;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 11;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result118(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  model->segment_count = 10;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result119(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result120(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 8;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result121(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result122(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[15] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result123(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result124(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result125(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  model->segment_count = 10;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result126(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result127(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result128(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 3;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result129(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result130(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[17] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  model->segment_count = 13;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result131(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 5;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result132(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result133(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result134(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result135(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 12;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result136(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result137(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result138(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result139(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result140(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 11;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result141(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result142(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) simplesegment12;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[17] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 13;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result143(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result144(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 10;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result145(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[6] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result146(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result147(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment10;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[16] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result148(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result149(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result150(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result151(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) simplesegment6;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[15] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result152(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result153(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result154(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result155(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[14] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 10;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result156(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[10] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 6;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result157(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 14;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result158(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment8;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result159(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) simplesegment13;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result160(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result161(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  model->segment_count = 12;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result162(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result163(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 11;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result164(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[5] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 3;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result165(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result166(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result167(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment11;
  turnout3->divergent = (Segment *) simplesegment8;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) simplesegment7;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result168(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  model->segment_count = 8;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result169(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[14] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 11;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result170(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result171(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 12;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result172(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 2;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result173(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result174(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result175(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result176(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result177(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  model->segment_count = 10;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result178(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train4 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment7;
  model->trains[4] = train4;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result179(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result180(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 2;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result181(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result182(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result183(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result184(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result185(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result186(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) simplesegment4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result187(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train0 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment6;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment12;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result188(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[3] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[4] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  model->trains[3] = train3;

  model->segment_count = 3;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result189(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result190(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[11] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 7;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result191(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result192(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[12] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 8;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result193(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[11] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 7;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result194(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[11] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 7;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result195(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 5;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result196(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result197(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[12] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[13] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment9;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 10;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result198(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result199(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result200(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result201(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result202(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 14;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result203(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment12;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[17] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 13;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result204(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result205(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 2;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result206(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[9] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 6;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result207(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result208(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[12] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[13] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[14] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[15] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 12;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result209(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  model->segment_count = 2;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result210(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result211(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 13;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result212(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  model->segment_count = 9;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result213(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result214(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result215(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result216(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result217(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[7] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[8] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[9] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[10] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 7;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result218(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[13] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result219(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) simplesegment12;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result220(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result221(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[10] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout2;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[11] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  model->trains[4] = train4;

  model->segment_count = 8;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result222(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment13;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 2;
}
void generate_model_result223(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  model->segment_count = 4;
  model->turnout_count = 4;
  model->train_count = 3;
}
void generate_model_result224(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment12;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  model->segment_count = 14;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result225(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result226(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 3;
}
void generate_model_result227(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result228(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result229(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout4;
  turnout4->divergent = (Segment *) simplesegment11;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result230(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[12] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout3;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 4;
  model->train_count = 4;
}
void generate_model_result231(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  model->segment_count = 2;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result232(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[11] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 3;
  model->train_count = 4;
}
void generate_model_result233(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  model->segment_count = 4;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result234(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result235(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[8] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 6;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result236(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[4] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[5] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[6] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  model->segment_count = 2;
  model->turnout_count = 5;
  model->train_count = 2;
}
void generate_model_result237(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[9] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[10] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  model->segment_count = 9;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result238(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[10] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[11] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  model->segment_count = 10;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result239(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result240(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[6] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[7] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 6;
  model->turnout_count = 2;
  model->train_count = 3;
}
void generate_model_result241(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[8] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[9] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  model->segment_count = 8;
  model->turnout_count = 2;
  model->train_count = 4;
}
void generate_model_result242(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[13] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[14] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[15] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[16] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[17] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment11;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 13;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result243(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[4] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[5] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[6] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[7] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[8] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 4;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result244(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[7] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[8] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[9] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) turnout4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  model->segment_count = 5;
  model->turnout_count = 5;
  model->train_count = 3;
}
void generate_model_result245(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[5] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout0;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[6] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 5;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result246(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train3 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[14] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[15] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[16] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[17] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[18] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment13;
  model->trains[3] = train3;

  model->segment_count = 14;
  model->turnout_count = 5;
  model->train_count = 4;
}
void generate_model_result247(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result248(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[11] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[12] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout1;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[13] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  model->segment_count = 11;
  model->turnout_count = 3;
  model->train_count = 2;
}
void generate_model_result249(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[2] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[3] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  model->segment_count = 2;
  model->turnout_count = 2;
  model->train_count = 2;
}
void generate_model_result250(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train4 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment7;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result251(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to_count = 0;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result252(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment14;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result253(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment7;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result254(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment17)->connected_to_count = 1;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result255(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result256(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result257(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result258(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  train1 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train4 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment18)->connected_to_count = 1;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment15;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment15;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment16;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result259(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result260(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to_count = 0;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment9;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result261(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result262(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment13;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) simplesegment8;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result263(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result264(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result265(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train1 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment15;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result266(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment17;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train2 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment17;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment16;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result267(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result268(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment16;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result269(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train3 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train0 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment16;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment15;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result270(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result271(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train3 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment16;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment16;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result272(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) simplesegment5;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result273(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result274(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result275(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result276(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result277(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result278(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result279(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result280(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result281(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment14;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment4;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result282(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result283(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to_count = 0;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train4 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment6;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result284(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment15;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result285(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train1 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment16;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result286(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train3 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  train2 ;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment17;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment15;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result287(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result288(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment0;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result289(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train2 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment16;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result290(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result291(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result292(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment14;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result293(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train4 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment16;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result294(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result295(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment18;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train0 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment16;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result296(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result297(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train0 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment16;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result298(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to_count = 0;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result299(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result300(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to_count = 0;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result301(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result302(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment10;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result303(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result304(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result305(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment12;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result306(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result307(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment12;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result308(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment13;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result309(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train2 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment16;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result310(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result311(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train1 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment16;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment16;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result312(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result313(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result314(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result315(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result316(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to_count = 0;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result317(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment10;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result318(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result319(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result320(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to_count = 0;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result321(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result322(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result323(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train3 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment17)->connected_to_count = 1;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment16;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment16;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result324(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train4 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment16;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment16;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result325(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment14;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result326(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to_count = 0;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result327(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result328(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment14;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result329(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result330(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train0 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment15;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result331(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) simplesegment9;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result332(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result333(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result334(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result335(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment17)->connected_to_count = 1;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result336(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment15;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result337(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment11;
  turnout4->divergent = (Segment *) simplesegment4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result338(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result339(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result340(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to_count = 0;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment13;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result341(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment6;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result342(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  train4 ;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment17;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result343(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train1 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment17)->connected_to_count = 1;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment15;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result344(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result345(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) simplesegment6;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result346(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result347(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment6;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment6;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result348(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment13;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment13;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result349(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment4;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result350(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result351(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) simplesegment0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result352(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result353(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train3 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment7;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result354(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result355(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result356(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result357(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result358(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result359(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result360(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result361(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment10;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result362(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result363(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment15;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result364(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment12;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result365(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result366(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train1 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment16;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result367(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result368(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result369(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) simplesegment16;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment7;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result370(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train3 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to_count = 0;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment15;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment15;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment13;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result371(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment13;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result372(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to_count = 0;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment1;
  turnout4->divergent = (Segment *) simplesegment3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result373(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train3 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment13;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment13;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result374(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment17;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result375(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result376(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result377(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to_count = 0;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result378(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result379(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train0 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment12;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result380(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result381(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result382(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result383(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment7;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment10;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result384(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment13;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment9;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result385(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to_count = 0;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result386(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train2 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment14;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result387(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result388(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  train1 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment16;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment16;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result389(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to_count = 0;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train0 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment16;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment16;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result390(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result391(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result392(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result393(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment9;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment10;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result394(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment13;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result395(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment4;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result396(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment1;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment10;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result397(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result398(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment0;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result399(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train0 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment15;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment15;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result400(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment15;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result401(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result402(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result403(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment17;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment15;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result404(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment7;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result405(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result406(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result407(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result408(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result409(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) simplesegment13;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result410(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to_count = 0;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train3 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment13;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result411(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment9;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result412(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train4 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment6;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result413(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  SimpleSegment *simplesegment19 = &simplesegment19_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train1 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment19;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) simplesegment19)->segment_id = 19;
  ((Segment *) simplesegment19)->connected_to[0] = (Segment *) simplesegment18;
  ((Segment *) simplesegment19)->connected_to_count = 1;
  ((Segment *) simplesegment19)->train =  NULL;
  model->segments[19] = (Segment *) simplesegment19;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment15;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 20;
  model->turnout_count = 0;
  model->train_count = 5;
}
void generate_model_result414(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to_count = 0;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment14;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result415(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment10;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result416(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment12;
  turnout0->divergent = (Segment *) simplesegment4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment12;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result417(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result418(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment15;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result419(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train1 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment8;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment10;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result420(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to_count = 0;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment10;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment13;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result421(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result422(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result423(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result424(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train2 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment12;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result425(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train1 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to_count = 0;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment13;
  turnout3->divergent = (Segment *) simplesegment14;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment13;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result426(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to_count = 0;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment13;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment13;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result427(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to_count = 0;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment12;
  turnout3->divergent = (Segment *) simplesegment9;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result428(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result429(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment6;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result430(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train4 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment5;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result431(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result432(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train2 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  train0 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment15;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment15;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment14;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result433(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment3;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result434(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment15;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result435(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment5;
  turnout4->divergent = (Segment *) simplesegment13;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result436(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment3;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment9;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result437(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment10;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result438(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to_count = 0;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment10;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment11;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result439(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result440(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train1 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment16;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result441(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to_count = 0;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train2 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment8;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result442(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train0 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment10;
  turnout3->divergent = (Segment *) simplesegment14;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment14;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment10;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result443(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to_count = 0;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment8;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) simplesegment11;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result444(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train3 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment14;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result445(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train2 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train3 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment11;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment11;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result446(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train4 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment10;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result447(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train2 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train1 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment9;
  turnout0->divergent = (Segment *) simplesegment15;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment11;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment5;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result448(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train2 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment9;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result449(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train2 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment6;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment9;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result450(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to_count = 0;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train1 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment16;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment15;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result451(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment8;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result452(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train0 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train4 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment14;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result453(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train1 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment6;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment6;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result454(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train3 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment7;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment16;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result455(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment6;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment1;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment2;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result456(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment5;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result457(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to_count = 0;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment8;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result458(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment2;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment7;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result459(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[16] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[17] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout3;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[18] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[19] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment13;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 16;
  model->turnout_count = 4;
  model->train_count = 5;
}
void generate_model_result460(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to_count = 0;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) simplesegment14;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result461(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment16;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result462(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) turnout1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment12;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result463(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment2;
  turnout0->divergent = (Segment *) simplesegment5;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result464(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment5;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment5;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train4 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment1;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train1 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout3;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout3;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result465(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment10;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment14;
  turnout1->divergent = (Segment *) simplesegment4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result466(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train1 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment13;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train3 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment15;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment8;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result467(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment10;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout4;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) simplesegment10;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result468(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train4 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train0 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  train2 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment5;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment10;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment9;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment10;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result469(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train2 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment15;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result470(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train4 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train0 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment5;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment13;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result471(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train2 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train0 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to_count = 0;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train4 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) simplesegment11;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment5;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment5;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment11;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result472(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  train2 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train1 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  train0 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment7;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment14;
  turnout2->divergent = (Segment *) simplesegment7;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment16;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment12;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment7;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result473(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) turnout3;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train1 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment14;
  turnout3->divergent = (Segment *) simplesegment12;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment12;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout3;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result474(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  train4 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) simplesegment11;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout0;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment3;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result475(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train1 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment9;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result476(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train2 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment3;
  turnout1->divergent = (Segment *) turnout3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment8;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment8;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment11;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment11;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result477(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train3 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 1;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout2;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train0 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout3;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment2;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result478(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to_count = 0;
  ((Segment *) simplesegment0)->train =  train4 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train1 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train3 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train0 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment8;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment4;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment6;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment0;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result479(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment14;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result480(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train4 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment1;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout4;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout2;
  turnout3->divergent = (Segment *) simplesegment3;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment14;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result481(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to_count = 1;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train4 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  train2 ;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment14;
  turnout0->divergent = (Segment *) simplesegment0;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment17;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment6;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result482(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment16;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train3 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train2 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train0 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) simplesegment15;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment1;
  turnout2->divergent = (Segment *) turnout1;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment7;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment6;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment5;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result483(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  SimpleSegment *simplesegment18 = &simplesegment18_obj;
  Turnout *turnout0 = &turnout0_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train0 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment18;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment18;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 1;
  ((Segment *) simplesegment16)->train =  train1 ;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) simplesegment18)->segment_id = 18;
  ((Segment *) simplesegment18)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment18)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment18)->connected_to_count = 2;
  ((Segment *) simplesegment18)->train =  NULL;
  model->segments[18] = (Segment *) simplesegment18;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[19] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment16;
  turnout0->divergent = (Segment *) simplesegment12;
  model->turnouts[0] = turnout0;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment16;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 19;
  model->turnout_count = 1;
  model->train_count = 5;
}
void generate_model_result484(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train0 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) simplesegment11;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result485(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  train4 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment13;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment12;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment3;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout1;
  turnout4->divergent = (Segment *) turnout2;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment12;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result486(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train1 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  train3 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment15)->connected_to_count = 1;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment0;
  turnout0->divergent = (Segment *) simplesegment1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment11;
  turnout1->divergent = (Segment *) simplesegment12;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment15;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result487(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train0 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment6;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train2 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 1;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment6;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout1;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result488(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  train3 ;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout3;
  turnout0->divergent = (Segment *) turnout4;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout4;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment12;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train2 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout4;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment12;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result489(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  train3 ;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 1;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train2 ;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment3;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment8;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment4;
  turnout2->divergent = (Segment *) simplesegment14;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result490(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  SimpleSegment *simplesegment17 = &simplesegment17_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train2 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  train1 ;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment17;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment17;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  train4 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) simplesegment17)->segment_id = 17;
  ((Segment *) simplesegment17)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment17)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment17)->connected_to_count = 2;
  ((Segment *) simplesegment17)->train =  NULL;
  model->segments[17] = (Segment *) simplesegment17;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train3 ;
  model->segments[18] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train0 ;
  model->segments[19] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment0;
  turnout1->divergent = (Segment *) simplesegment9;
  model->turnouts[1] = turnout1;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout1;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment0;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment9;
  model->trains[4] = train4;

  model->segment_count = 18;
  model->turnout_count = 2;
  model->train_count = 5;
}
void generate_model_result491(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train3 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train1 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) simplesegment4)->connected_to_count = 1;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train0 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment7;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train4 ;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout2;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment0;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment2;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout2;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment13;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment0;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout1;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result492(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train4 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  train3 ;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  train0 ;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout1;
  turnout0->divergent = (Segment *) turnout2;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment11;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment11;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment10;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment8;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result493(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  train0 ;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  train4 ;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment9)->connected_to_count = 1;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) turnout3;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment8;
  turnout1->divergent = (Segment *) simplesegment13;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) turnout3)->connected_to_count = 1;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) simplesegment12;
  turnout3->divergent = (Segment *) turnout0;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  train3 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment9;
  turnout4->divergent = (Segment *) turnout0;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment0;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment6;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result494(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to_count = 1;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train1 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout2;
  turnout0->divergent = (Segment *) simplesegment9;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment6;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment13;
  turnout2->divergent = (Segment *) turnout0;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train2 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout1;
  turnout3->divergent = (Segment *) simplesegment2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment6;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout0;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout3;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result495(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train3 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 1;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train0 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train4 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment10;
  turnout0->divergent = (Segment *) simplesegment14;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout1)->connected_to_count = 1;
  ((Segment *) turnout1)->train =  train1 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) simplesegment6;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  NULL;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment14;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout1;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment4;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment15;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result496(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train2 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment5)->connected_to_count = 1;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  train1 ;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment12)->connected_to_count = 1;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) turnout4;
  turnout0->divergent = (Segment *) simplesegment6;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment12;
  turnout1->divergent = (Segment *) simplesegment3;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train4 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) turnout4;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  train3 ;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout4;
  turnout3->divergent = (Segment *) simplesegment7;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout4)->connected_to_count = 1;
  ((Segment *) turnout4)->train =  train0 ;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) turnout0;
  turnout4->divergent = (Segment *) turnout3;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout4;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment7;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout3;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout2;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
void generate_model_result497(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment3;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) simplesegment15;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  train4 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment14)->connected_to_count = 1;
  ((Segment *) simplesegment14)->train =  train2 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  train0 ;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment11;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  train3 ;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) simplesegment14;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train1 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) simplesegment15;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment15;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) turnout2;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment14;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) turnout1;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment2;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result498(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  SimpleSegment *simplesegment15 = &simplesegment15_obj;
  SimpleSegment *simplesegment16 = &simplesegment16_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment11;
  ((Segment *) simplesegment1)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment1)->connected_to_count = 2;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to_count = 1;
  ((Segment *) simplesegment2)->train =  NULL;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment9;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  train4 ;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  NULL;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment6)->connected_to_count = 1;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment8)->connected_to_count = 1;
  ((Segment *) simplesegment8)->train =  train3 ;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  NULL;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment11)->connected_to_count = 1;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment15;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment14;
  ((Segment *) simplesegment13)->connected_to[1] = (Segment *) simplesegment16;
  ((Segment *) simplesegment13)->connected_to_count = 2;
  ((Segment *) simplesegment13)->train =  train2 ;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  train1 ;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) simplesegment15)->segment_id = 15;
  ((Segment *) simplesegment15)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment15)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment15)->connected_to_count = 2;
  ((Segment *) simplesegment15)->train =  NULL;
  model->segments[15] = (Segment *) simplesegment15;

  ((Segment *) simplesegment16)->segment_id = 16;
  ((Segment *) simplesegment16)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment16)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment16)->connected_to_count = 2;
  ((Segment *) simplesegment16)->train =  NULL;
  model->segments[16] = (Segment *) simplesegment16;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  NULL;
  model->segments[17] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment4;
  turnout0->divergent = (Segment *) simplesegment8;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[18] = (Segment *) turnout1;
  turnout1->straight = (Segment *) simplesegment2;
  turnout1->divergent = (Segment *) turnout0;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train0 ;
  model->segments[19] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout1;
  turnout2->divergent = (Segment *) simplesegment11;
  model->turnouts[2] = turnout2;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) turnout2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment14;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) simplesegment13;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment8;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) simplesegment4;
  model->trains[4] = train4;

  model->segment_count = 17;
  model->turnout_count = 3;
  model->train_count = 5;
}
void generate_model_result499(ModelRoot *model) {

  Train *train0 = &train0_obj;
  Train *train1 = &train1_obj;
  Train *train2 = &train2_obj;
  Train *train3 = &train3_obj;
  Train *train4 = &train4_obj;
  SimpleSegment *simplesegment0 = &simplesegment0_obj;
  SimpleSegment *simplesegment1 = &simplesegment1_obj;
  SimpleSegment *simplesegment2 = &simplesegment2_obj;
  SimpleSegment *simplesegment3 = &simplesegment3_obj;
  SimpleSegment *simplesegment4 = &simplesegment4_obj;
  SimpleSegment *simplesegment5 = &simplesegment5_obj;
  SimpleSegment *simplesegment6 = &simplesegment6_obj;
  SimpleSegment *simplesegment7 = &simplesegment7_obj;
  SimpleSegment *simplesegment8 = &simplesegment8_obj;
  SimpleSegment *simplesegment9 = &simplesegment9_obj;
  SimpleSegment *simplesegment10 = &simplesegment10_obj;
  SimpleSegment *simplesegment11 = &simplesegment11_obj;
  SimpleSegment *simplesegment12 = &simplesegment12_obj;
  SimpleSegment *simplesegment13 = &simplesegment13_obj;
  SimpleSegment *simplesegment14 = &simplesegment14_obj;
  Turnout *turnout0 = &turnout0_obj;
  Turnout *turnout1 = &turnout1_obj;
  Turnout *turnout2 = &turnout2_obj;
  Turnout *turnout3 = &turnout3_obj;
  Turnout *turnout4 = &turnout4_obj;
  

  ((Segment *) simplesegment0)->segment_id = 0;
  ((Segment *) simplesegment0)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) simplesegment0)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) simplesegment0)->connected_to_count = 2;
  ((Segment *) simplesegment0)->train =  NULL;
  model->segments[0] = (Segment *) simplesegment0;

  ((Segment *) simplesegment1)->segment_id = 1;
  ((Segment *) simplesegment1)->connected_to[0] = (Segment *) simplesegment12;
  ((Segment *) simplesegment1)->connected_to_count = 1;
  ((Segment *) simplesegment1)->train =  NULL;
  model->segments[1] = (Segment *) simplesegment1;

  ((Segment *) simplesegment2)->segment_id = 2;
  ((Segment *) simplesegment2)->connected_to[0] = (Segment *) turnout2;
  ((Segment *) simplesegment2)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) simplesegment2)->connected_to_count = 2;
  ((Segment *) simplesegment2)->train =  train0 ;
  model->segments[2] = (Segment *) simplesegment2;

  ((Segment *) simplesegment3)->segment_id = 3;
  ((Segment *) simplesegment3)->connected_to[0] = (Segment *) simplesegment10;
  ((Segment *) simplesegment3)->connected_to[1] = (Segment *) simplesegment13;
  ((Segment *) simplesegment3)->connected_to_count = 2;
  ((Segment *) simplesegment3)->train =  NULL;
  model->segments[3] = (Segment *) simplesegment3;

  ((Segment *) simplesegment4)->segment_id = 4;
  ((Segment *) simplesegment4)->connected_to[0] = (Segment *) simplesegment6;
  ((Segment *) simplesegment4)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment4)->connected_to_count = 2;
  ((Segment *) simplesegment4)->train =  NULL;
  model->segments[4] = (Segment *) simplesegment4;

  ((Segment *) simplesegment5)->segment_id = 5;
  ((Segment *) simplesegment5)->connected_to[0] = (Segment *) turnout0;
  ((Segment *) simplesegment5)->connected_to[1] = (Segment *) turnout2;
  ((Segment *) simplesegment5)->connected_to_count = 2;
  ((Segment *) simplesegment5)->train =  train1 ;
  model->segments[5] = (Segment *) simplesegment5;

  ((Segment *) simplesegment6)->segment_id = 6;
  ((Segment *) simplesegment6)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment6)->connected_to[1] = (Segment *) simplesegment10;
  ((Segment *) simplesegment6)->connected_to_count = 2;
  ((Segment *) simplesegment6)->train =  NULL;
  model->segments[6] = (Segment *) simplesegment6;

  ((Segment *) simplesegment7)->segment_id = 7;
  ((Segment *) simplesegment7)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment7)->connected_to[1] = (Segment *) simplesegment12;
  ((Segment *) simplesegment7)->connected_to_count = 2;
  ((Segment *) simplesegment7)->train =  NULL;
  model->segments[7] = (Segment *) simplesegment7;

  ((Segment *) simplesegment8)->segment_id = 8;
  ((Segment *) simplesegment8)->connected_to[0] = (Segment *) simplesegment7;
  ((Segment *) simplesegment8)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment8)->connected_to_count = 2;
  ((Segment *) simplesegment8)->train =  NULL;
  model->segments[8] = (Segment *) simplesegment8;

  ((Segment *) simplesegment9)->segment_id = 9;
  ((Segment *) simplesegment9)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) simplesegment9)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) simplesegment9)->connected_to_count = 2;
  ((Segment *) simplesegment9)->train =  train3 ;
  model->segments[9] = (Segment *) simplesegment9;

  ((Segment *) simplesegment10)->segment_id = 10;
  ((Segment *) simplesegment10)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment10)->connected_to[1] = (Segment *) simplesegment6;
  ((Segment *) simplesegment10)->connected_to_count = 2;
  ((Segment *) simplesegment10)->train =  NULL;
  model->segments[10] = (Segment *) simplesegment10;

  ((Segment *) simplesegment11)->segment_id = 11;
  ((Segment *) simplesegment11)->connected_to[0] = (Segment *) simplesegment8;
  ((Segment *) simplesegment11)->connected_to[1] = (Segment *) simplesegment14;
  ((Segment *) simplesegment11)->connected_to_count = 2;
  ((Segment *) simplesegment11)->train =  NULL;
  model->segments[11] = (Segment *) simplesegment11;

  ((Segment *) simplesegment12)->segment_id = 12;
  ((Segment *) simplesegment12)->connected_to[0] = (Segment *) simplesegment1;
  ((Segment *) simplesegment12)->connected_to[1] = (Segment *) simplesegment7;
  ((Segment *) simplesegment12)->connected_to_count = 2;
  ((Segment *) simplesegment12)->train =  NULL;
  model->segments[12] = (Segment *) simplesegment12;

  ((Segment *) simplesegment13)->segment_id = 13;
  ((Segment *) simplesegment13)->connected_to[0] = (Segment *) simplesegment3;
  ((Segment *) simplesegment13)->connected_to_count = 1;
  ((Segment *) simplesegment13)->train =  NULL;
  model->segments[13] = (Segment *) simplesegment13;

  ((Segment *) simplesegment14)->segment_id = 14;
  ((Segment *) simplesegment14)->connected_to[0] = (Segment *) simplesegment4;
  ((Segment *) simplesegment14)->connected_to[1] = (Segment *) simplesegment11;
  ((Segment *) simplesegment14)->connected_to_count = 2;
  ((Segment *) simplesegment14)->train =  NULL;
  model->segments[14] = (Segment *) simplesegment14;

  ((Segment *) turnout0)->segment_id = 0;
  ((Segment *) turnout0)->connected_to[0] = (Segment *) simplesegment5;
  ((Segment *) turnout0)->connected_to[1] = (Segment *) turnout3;
  ((Segment *) turnout0)->connected_to_count = 2;
  ((Segment *) turnout0)->train =  train4 ;
  model->segments[15] = (Segment *) turnout0;
  turnout0->straight = (Segment *) simplesegment5;
  turnout0->divergent = (Segment *) turnout1;
  model->turnouts[0] = turnout0;

  ((Segment *) turnout1)->segment_id = 1;
  ((Segment *) turnout1)->connected_to[0] = (Segment *) simplesegment9;
  ((Segment *) turnout1)->connected_to[1] = (Segment *) turnout4;
  ((Segment *) turnout1)->connected_to_count = 2;
  ((Segment *) turnout1)->train =  NULL;
  model->segments[16] = (Segment *) turnout1;
  turnout1->straight = (Segment *) turnout0;
  turnout1->divergent = (Segment *) turnout4;
  model->turnouts[1] = turnout1;

  ((Segment *) turnout2)->segment_id = 2;
  ((Segment *) turnout2)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout2)->connected_to[1] = (Segment *) simplesegment5;
  ((Segment *) turnout2)->connected_to_count = 2;
  ((Segment *) turnout2)->train =  train2 ;
  model->segments[17] = (Segment *) turnout2;
  turnout2->straight = (Segment *) turnout3;
  turnout2->divergent = (Segment *) simplesegment2;
  model->turnouts[2] = turnout2;

  ((Segment *) turnout3)->segment_id = 3;
  ((Segment *) turnout3)->connected_to[0] = (Segment *) simplesegment2;
  ((Segment *) turnout3)->connected_to[1] = (Segment *) turnout0;
  ((Segment *) turnout3)->connected_to_count = 2;
  ((Segment *) turnout3)->train =  NULL;
  model->segments[18] = (Segment *) turnout3;
  turnout3->straight = (Segment *) turnout0;
  turnout3->divergent = (Segment *) turnout2;
  model->turnouts[3] = turnout3;

  ((Segment *) turnout4)->segment_id = 4;
  ((Segment *) turnout4)->connected_to[0] = (Segment *) simplesegment0;
  ((Segment *) turnout4)->connected_to[1] = (Segment *) turnout1;
  ((Segment *) turnout4)->connected_to_count = 2;
  ((Segment *) turnout4)->train =  NULL;
  model->segments[19] = (Segment *) turnout4;
  turnout4->straight = (Segment *) simplesegment13;
  turnout4->divergent = (Segment *) turnout1;
  model->turnouts[4] = turnout4;

  train0->train_id = 0;
  train0->speed = 76.0;
  train0->location = (Segment *) simplesegment2;
  model->trains[0] = train0;

  train1->train_id = 1;
  train1->speed = 0.0;
  train1->location = (Segment *) simplesegment5;
  model->trains[1] = train1;

  train2->train_id = 2;
  train2->speed = 58.0;
  train2->location = (Segment *) turnout2;
  model->trains[2] = train2;

  train3->train_id = 3;
  train3->speed = 2.0;
  train3->location = (Segment *) simplesegment9;
  model->trains[3] = train3;

  train4->train_id = 4;
  train4->speed = 66.0;
  train4->location = (Segment *) turnout0;
  model->trains[4] = train4;

  model->segment_count = 15;
  model->turnout_count = 5;
  model->train_count = 5;
}
