Opened 11 years ago

Closed 10 years ago

#2142 closed defect (fixed)

It is not clear when simulation code files are generated

Reported by: anonymous Owned by: adeas31
Priority: high Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: OMEdit Cc:

Description

OMEdit 1.9.0 beta4+dev(r15749)
Mac OS X 10.7.5
User account without administrator rights
It is not clear when simulation code files are generated

model Pendulum

annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
parameter Real L = 0.2;
constant Real g = 9.81;
Real theta(start = 0.1);
Real omega;

equation

der(theta) = omega;
der(omega) = -g / L * Modelica.Math.sin(theta);

end Pendulum;

Choose command simulate
Choose tab named output (Ausgabe)
Leave textfield file name (Dateiname (optional)) empty
Press button named simulate

-> No files are generated

Choose command simulate
Choose tab named output (Ausgabe)
Choose a filename f.x. simCode
Press button named simulate

-> No files are generated

Choose command simulate
Choose tab named output (Ausgabe)
Choose a filename with an absolute path f.x. /Users/tom/Desktop/simCode
Press button named simulate

-> The following files are generated (ls command). Some with a '?' in their name.
simCode
simCode?.c
simCode?.libs
simCode?.makefile
simCode?_functions.c
simCode?_functions.h
simCode?_info.xml
simCode?_init.xml
simCode?_model.h
simCode?_records.c

Non valid code in simCode
_functions.h:

#ifndef /Users/tom/Desktop/simCode
H
#define /Users/tom/Desktop/simCode
H
#ifdef _OPENMP_
#include <omp.h>
#else
#define omp_get_thread_num() 0
#define omp_get_max_threads() 1
#endif
#include "modelica.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#include "simulation_runtime.h"
#ifdef cplusplus
extern "C" {
#endif
#ifdef
cplusplus
}
#endif
#endif

Change History (4)

comment:1 Changed 11 years ago by sjoelund.se

  • Milestone changed from 1.9.0 to 1.9.1

Postponed until 1.9.1

comment:2 Changed 11 years ago by sjoelund.se

  • Owner changed from probably noone to adeas31
  • Status changed from new to assigned

Adeel: Maybe add a tooltip stating the working directory (path is relative to this)

comment:3 Changed 11 years ago by sjoelund.se

  • Component changed from Backend to OMEdit

comment:4 Changed 10 years ago by adeas31

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.