How can I get an entity edit path? I made a module, and defined my custom entity there. I set the path for the administrative page using the following array.

'admin ui' =&gt; array(
  'path' =&gt; 'admin/structure/optimizations',
)


How can I get the edit path for one instance of my entity, for example admin/structure/optimizations/manage/2?

I don't think its a good idea to hard-code the path as with  'admin/structure/optimizations/manage' . $entity-&gt;id.
Is there any function to get the edit path for an entity?
You may want to take a look at hook_menu()

Here you can define paths and route variables to where they are needed.  

For example:

function hook_menu() {
  $items['admin/structure/optimizations/manage/%'] = array(
      'title' =&gt; t('Your Page Title'),
      'page callback' =&gt; '_your_callback', // The callback that is building the page
      'page callback' =&gt; array(1), // This is the value from the % array key
      'access arguments' =&gt; array('administer users'), // A permission to require
      'type' =&gt; MENU_NORMAL_ITEM,
  );
}

function _your_callback($val) {

  //Access the % from the URL defined in hook menu using $val.

  ...

}