Quickguide SIM Problem: Difference between revisions

From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the Quickguide Manual|link=Quickguide}} Simulation problems can be of any problem type, but in general they are global black-box problem int...")
(No difference)

Revision as of 09:50, 10 August 2011

Notice.png

This page is part of the Quickguide Manual. See Quickguide.

Simulation problems can be of any problem type, but in general they are global black-box problem interfacing an external simulator. The setup may require that objective values and constraints are evaluated simultaneously. To accommodate this in TOMLAB a special assign routine has been developed, simAssign. The solver execution will be much more efficient if using this assign routine.

The simulation problem is identical to the mixed-integer nonlinear programming problem defined as:


where Failed to parse (unknown function "\MATHSET"): {\displaystyle x, x_L, x_U \in \MATHSET{R}^n} , Failed to parse (unknown function "\MATHSET"): {\displaystyle f(x) \in \MATHSET{R}} , Failed to parse (unknown function "\MATHSET"): {\displaystyle A \in \MATHSET{R}^{m_1 \times n}} , Failed to parse (unknown function "\MATHSET"): {\displaystyle b_L,b_U \in \MATHSET{R}^{m_1}} and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle c_L,c(x),c_U \in \MATHSET{R}^{m_2}} . The variables , the index subset of , are restricted to be integers.

Example problem:

The following files define a problem in TOMLAB.

File: tomlab/quickguide/simQG.m, simQG_fc.m, simQG_gdc.m

fc:   Function value and nonlinear constraint vector
gdc:  Gradient vector and nonlinear constraint gradient matrix

The following file illustrates how to solve this simulation (SIM) problem in TOMLAB. Also view the m-files specified above for more information.

File: tomlab/quickguide/simQG.m

Open the file for viewing, and execute simQG in Matlab.

 % simQG is a small example problem for defining and solving simulation
 % problems where the objective function and constraints are evaluated
 % during the same function call.
 
 Name = 'HS 47';
 b_L  = [];
 b_U  = [];
 A    = [];
 c_L  = [0; 0; 0];
 c_U  = [0; 0; 0];
 x_0  = [2; sqrt(2); -1; 2-sqrt(2); .5];
 x_L  = [];
 x_U  = [];
 
 Prob = simAssign('simQG_fc', 'simQG_gdc', [], [], x_L, x_U, ...
        Name, x_0, [], A, b_L, b_U, [], c_L, c_U);
    
 Result = tomRun('snopt', Prob, 1);
 % Prob.KNITRO.options.HESSOPT = 6;
 % Prob.KNITRO.options.ALG = 3;
 % Result2 = tomRun('knitro', Prob, 1);