Download manual [372769 bytes]

Transcript
Step 2: In the following, assume you have created a C code problem, located in your RIOTS_95/systems
directory, called "my_problem.c". Before executing these commands, save the version of "simulate.mex"
that comes distributed with RIOTS_95 to another file, say, "m_sim.mex". Then, if you want to use the mfile interface later (in which case you can move "m_sim.mex" back to "simulate.mex"). Open a DOS box
in Windows and execute the following sequence of commands:
•
‘command /e:4096’ (to increase the size of the environment space.)
•
‘cd \riots_95’
•
change relevant disk/directory setings in "compile.bat" and "cmex.bat" with a file editor.
•
‘cd systems’
•
‘compile my_problem.c’
‘linksimu my_problem.o’
These sequence of commands will generate a file called "simulate.mex" which is used by RIOTS_95 to
solve your problem.
Step 3: To use RIOTS_95 to solve your optimal control problem,
•
Run Matlab and at the Matlab prompt, type:
>> path(path,’\riots_95’)
>> cd systems
Now you are ready to use RIOTS_95 to solve your problem.
The M-file interface.
As mentioned above, RIOTS_95 comes distributed to run user m-file programs. This allows users that do
not have the Watcom C compiler to use RIOTS_95. The m-file interface for RIOTS_95 can be produced
with the Watcom C compiler with the following steps executed in a DOS box:
•
Compile "msyslink.c"
•
Run "linksimu.bat"
With the m-file interface, the user only needs to provide "sys_*.m" m-files, but the solution time is much
longer than with C code.
Section 8: Compiling RIOTS_95
81